Changeset 31922


Ignore:
Timestamp:
2012-05-27T19:10:00+02:00 (6 years ago)
Author:
juhosg
Message:

ramips: rt3883: add device registration code for the SPI controller

Location:
trunk/target/linux/ramips/files/arch/mips/ralink/rt3883
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt3883/devices.c

    r30655 r31922  
    1515#include <linux/mtd/partitions.h> 
    1616#include <linux/dma-mapping.h> 
     17#include <linux/spi/spi.h> 
    1718#include <linux/delay.h> 
    1819#include <linux/err.h> 
     
    379380        platform_device_register(&rt3883_nand_device); 
    380381} 
     382 
     383static struct resource rt3883_spi_resources[] = { 
     384        { 
     385                .flags  = IORESOURCE_MEM, 
     386                .start  = RT3883_SPI_BASE, 
     387                .end    = RT3883_SPI_BASE + RT3883_SPI_SIZE - 1, 
     388        }, 
     389}; 
     390 
     391static struct platform_device rt3883_spi_device = { 
     392        .name           = "ramips-spi", 
     393        .id             = 0, 
     394        .resource       = rt3883_spi_resources, 
     395        .num_resources  = ARRAY_SIZE(rt3883_spi_resources), 
     396}; 
     397 
     398void __init rt3883_register_spi(struct spi_board_info *info, int n) 
     399{ 
     400        spi_register_board_info(info, n); 
     401        platform_device_register(&rt3883_spi_device); 
     402} 
     403 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt3883/devices.h

    r30655 r31922  
    1313 
    1414struct physmap_flash_data; 
     15struct spi_board_info; 
    1516 
    1617extern struct physmap_flash_data rt3883_flash0_data; 
     
    2930void rt3883_register_wdt(bool enable_reset); 
    3031 
     32void rt3883_register_spi(struct spi_board_info *info, int n); 
     33 
    3134#endif  /* _RT3883_DEVICES_H */ 
Note: See TracChangeset for help on using the changeset viewer.