Changeset 31644


Ignore:
Timestamp:
Mar 12, 2017, 11:37:57 PM (5 months ago)
Author:
brainslayer
Message:

fix laguna build

Location:
src/linux/universal/linux-4.9
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/.config_laguna_nosmp

    r31630 r31644  
    28852885CONFIG_DEBUG_FS=y
    28862886# CONFIG_HEADERS_CHECK is not set
    2887 # CONFIG_DEBUG_SECTION_MISMATCH is not set
     2887CONFIG_DEBUG_SECTION_MISMATCH=y
    28882888# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
    28892889CONFIG_FRAME_POINTER=y
  • src/linux/universal/linux-4.9/arch/arm/mach-cns3xxx/laguna.c

    r31638 r31644  
    649649};
    650650
    651 static struct memory_accessor *at24_mem_acc;
    652 
    653 static void at24_setup(struct memory_accessor *mem_acc, void *context)
     651static struct nvmem_device *at24_nvmem;
     652
     653static void __init at24_setup(struct nvmem_device *mem_acc, void *context)
    654654{
    655655        char buf[16];
    656656
    657         at24_mem_acc = mem_acc;
    658 
    659         /* Read MAC addresses */
    660         if (at24_mem_acc->read(at24_mem_acc, buf, 0x100, 6) == 6)
     657        at24_nvmem = mem_acc;
     658
     659        if (nvmem_device_read(at24_nvmem, 0x100, 6, buf) == 6)
    661660                memcpy(&laguna_net_data.hwaddr[0], buf, ETH_ALEN);
    662         if (at24_mem_acc->read(at24_mem_acc, buf, 0x106, 6) == 6)
     661        if (nvmem_device_read(at24_nvmem, 0x106, 6, buf) == 6)
    663662                memcpy(&laguna_net_data.hwaddr[1], buf, ETH_ALEN);
    664         if (at24_mem_acc->read(at24_mem_acc, buf, 0x10C, 6) == 6)
     663        if (nvmem_device_read(at24_nvmem, 0x10C, 6, buf) == 6)
    665664                memcpy(&laguna_net_data.hwaddr[2], buf, ETH_ALEN);
    666         if (at24_mem_acc->read(at24_mem_acc, buf, 0x112, 6) == 6)
     665        if (nvmem_device_read(at24_nvmem, 0x112, 6, buf) == 6)
    667666                memcpy(&laguna_net_data.hwaddr[3], buf, ETH_ALEN);
    668667
    669668        /* Read out Model Information */
    670         if (at24_mem_acc->read(at24_mem_acc, buf, 0x130, 16) == 16)
     669        if (nvmem_device_read(at24_nvmem, 0x130, 16, buf) == 16)
    671670                memcpy(&laguna_info.model, buf, 16);
    672         if (at24_mem_acc->read(at24_mem_acc, buf, 0x140, 1) == 1)
     671        if (nvmem_device_read(at24_nvmem, 0x140, 1, buf) == 1)
    673672                memcpy(&laguna_info.nor_flash_size, buf, 1);
    674         if (at24_mem_acc->read(at24_mem_acc, buf, 0x141, 1) == 1)
     673        if (nvmem_device_read(at24_nvmem, 0x141, 1, buf) == 1)
    675674                memcpy(&laguna_info.spi_flash_size, buf, 1);
    676         if (at24_mem_acc->read(at24_mem_acc, buf, 0x142, 4) == 4)
     675        if (nvmem_device_read(at24_nvmem, 0x142, 4, buf) == 4)
    677676                memcpy(&laguna_info.config_bitmap, buf, 4);
    678         if (at24_mem_acc->read(at24_mem_acc, buf, 0x146, 4) == 4)
     677        if (nvmem_device_read(at24_nvmem, 0x146, 4, buf) == 4)
    679678                memcpy(&laguna_info.config2_bitmap, buf, 4);
    680 };
    681 
    682 static struct at24_platform_data laguna_eeprom_info = {
     679
     680};
     681
     682static struct at24_platform_data __initdata laguna_eeprom_info = {
    683683        .byte_len = 1024,
    684684        .page_size = 16,
  • src/linux/universal/linux-4.9/drivers/spi/spi_cns3xxx.c

    r31574 r31644  
    272272}
    273273
    274 static void __init cns3xxx_spi_initial(void)
     274static void cns3xxx_spi_initial(void)
    275275{
    276276        u32 __iomem *gpiob = (void __iomem *) (CNS3XXX_MISC_BASE_VIRT + 0x0018);
     
    325325}
    326326
    327 static int __init cns3xxx_spi_probe(struct platform_device *pdev)
     327static int cns3xxx_spi_probe(struct platform_device *pdev)
    328328{
    329329        struct spi_master *master;
     
    429429};
    430430
    431 static int __init cns3xxx_spi_init(void)
     431static int cns3xxx_spi_init(void)
    432432{
    433433        return platform_driver_register(&cns3xxx_spi_driver);
    434434}
    435435
    436 static void __exit cns3xxx_spi_exit(void)
     436static void cns3xxx_spi_exit(void)
    437437{
    438438        platform_driver_unregister(&cns3xxx_spi_driver);
Note: See TracChangeset for help on using the changeset viewer.