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

Alejandro Mery amery at geeks.cl
Mon Dec 19 10:07:54 GMT 2011


Hi Tom,

On Mon, Dec 19, 2011 at 11:01, Tom Cubie <tangliang at allwinnertech.com> wrote:
> 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.

yes, thank you so much for clarifying this. :)



More information about the arm-netbook mailing list