[Arm-netbook] sun4i: pin/sys_config source code?

Tom Cubie tangliang at allwinnertech.com
Mon Dec 19 10:01:53 GMT 2011


Hi, Alejandro

     I think both of them can be safely removed. I don't know if you 
know the Allwinner style packaging system. There is an sys_config.fex 
file, which is a config file for the hardware related things. This 
sys_config.fex will handled by a pc tools to generate a bin file called 
sys_config.bin which contains the data structure of the config. And the 
sys_config.bin will be loaded by the bootloader to a reserved memery in 
linux. Then in the driver, they will use function like script_parser_xxx 
to get the hardware information.
     I think the main purpose for this complicated method is to separate 
the hardware and the software config work. Allwinner's customs are small 
companies with low R&D abilities. With this method, customs only need to 
change the sys_config.fex file to use different peripherals, without 
modifying the driver.
     Back to the sys_config1.bin and sys_config_verity_dd3.bin, 
sys_config1.bin is built in the kernel before, but is loaded by 
bootloader now, so sys_config1.bin is no use any more, but no one 
cleaned it. And sys_config_verity_dd3.bin, you can see in sys_config.S,

1:    .globl  sys_cofig_data
2:sys_cofig_data:
3:    .incbin "arch/arm/mach-sun4i/pin/sys_config_verify_ddr3.bin"
4:    .globl  sys_cofig_data_end
5:sys_cofig_data_end:

the label "sys_cofig_data" is only used one place 
arch/arm/mach-sun4i/pin/pin_ops.c

95:    #ifdef FPGA_RUNTIME_ENV
96:        return script_parser_init((char *)(sys_cofig_data));
97:    #else
98:        return script_parser_init((char 
*)__va(CONFIG_SW_SYSMEM_RESERVED_BASE));
99:    #endif

You can see the macro FPGA_RUNTIME_ENV is never defined if you use a 
chip. So, the sys_config_verify_ddr3.bin is a special config used when 
the chip is in designing on a fpga, from it's name it should be the 
config for verifying the ddr3 controller.

I hope i have explained clearly. You can remove the sys_config.S, 
sys_config1.bin, sys_config_verify_ddr3.bin, and clean the code in 
arch/arm/mach-sun4i/pin/pin_ops.c.



On 12/19/2011 04:41 PM, Alejandro Mery wrote:
> Hello, I'm starting to port sun4i support to linus' master and noticed
> the beside standby.bin there are two blobs without source code to
> generate them.
>
> arch/arm/mach-sun4i/pin/sys_config1.bin and
> arch/arm/mach-sun4i/pin/sys_config_verity_dd3.bin, the later been
> loaded by sys_config.S
>
> can you try to get that in a form we can actually get mainlined?
>
> Thanks,
> Alejandro
>
> _______________________________________________
> arm-netbook mailing list arm-netbook at lists.phcomp.co.uk
> http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
> Send large attachments to arm-netbook at files.phcomp.co.uk
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.phcomp.co.uk/pipermail/arm-netbook/attachments/20111219/93030f80/attachment-0001.html 


More information about the arm-netbook mailing list