lubbock.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * linux/arch/arm/mach-pxa/lubbock.c
  4. *
  5. * Support for the Intel DBPXA250 Development Platform.
  6. *
  7. * Author: Nicolas Pitre
  8. * Created: Jun 15, 2001
  9. * Copyright: MontaVista Software Inc.
  10. */
  11. #include <linux/clkdev.h>
  12. #include <linux/gpio.h>
  13. #include <linux/gpio/gpio-reg.h>
  14. #include <linux/gpio/machine.h>
  15. #include <linux/module.h>
  16. #include <linux/kernel.h>
  17. #include <linux/init.h>
  18. #include <linux/io.h>
  19. #include <linux/platform_device.h>
  20. #include <linux/syscore_ops.h>
  21. #include <linux/major.h>
  22. #include <linux/fb.h>
  23. #include <linux/interrupt.h>
  24. #include <linux/mtd/mtd.h>
  25. #include <linux/mtd/partitions.h>
  26. #include <linux/smc91x.h>
  27. #include <linux/slab.h>
  28. #include <linux/leds.h>
  29. #include <linux/spi/spi.h>
  30. #include <linux/spi/ads7846.h>
  31. #include <linux/spi/pxa2xx_spi.h>
  32. #include <asm/setup.h>
  33. #include <asm/memory.h>
  34. #include <asm/mach-types.h>
  35. #include <asm/irq.h>
  36. #include <linux/sizes.h>
  37. #include <asm/mach/arch.h>
  38. #include <asm/mach/map.h>
  39. #include <asm/mach/irq.h>
  40. #include <asm/mach/flash.h>
  41. #include <asm/hardware/sa1111.h>
  42. #include "pxa25x.h"
  43. #include <linux/platform_data/asoc-pxa.h>
  44. #include "lubbock.h"
  45. #include "udc.h"
  46. #include <linux/platform_data/irda-pxaficp.h>
  47. #include <linux/platform_data/video-pxafb.h>
  48. #include <linux/platform_data/mmc-pxamci.h>
  49. #include "pm.h"
  50. #include "smemc.h"
  51. #include "generic.h"
  52. #include "devices.h"
  53. static unsigned long lubbock_pin_config[] __initdata = {
  54. GPIO15_nCS_1, /* CS1 - Flash */
  55. GPIO78_nCS_2, /* CS2 - Baseboard FGPA */
  56. GPIO79_nCS_3, /* CS3 - SMC ethernet */
  57. GPIO80_nCS_4, /* CS4 - SA1111 */
  58. /* SSP data pins */
  59. GPIO23_SSP1_SCLK,
  60. GPIO25_SSP1_TXD,
  61. GPIO26_SSP1_RXD,
  62. /* AC97 */
  63. GPIO28_AC97_BITCLK,
  64. GPIO29_AC97_SDATA_IN_0,
  65. GPIO30_AC97_SDATA_OUT,
  66. GPIO31_AC97_SYNC,
  67. /* LCD - 16bpp DSTN */
  68. GPIOxx_LCD_DSTN_16BPP,
  69. /* BTUART */
  70. GPIO42_BTUART_RXD,
  71. GPIO43_BTUART_TXD,
  72. GPIO44_BTUART_CTS,
  73. GPIO45_BTUART_RTS,
  74. /* PC Card */
  75. GPIO48_nPOE,
  76. GPIO49_nPWE,
  77. GPIO50_nPIOR,
  78. GPIO51_nPIOW,
  79. GPIO52_nPCE_1,
  80. GPIO53_nPCE_2,
  81. GPIO54_nPSKTSEL,
  82. GPIO55_nPREG,
  83. GPIO56_nPWAIT,
  84. GPIO57_nIOIS16,
  85. /* MMC */
  86. GPIO6_MMC_CLK,
  87. GPIO8_MMC_CS0,
  88. /* SA1111 chip */
  89. GPIO11_3_6MHz,
  90. /* wakeup */
  91. GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
  92. };
  93. #define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
  94. void lubbock_set_hexled(uint32_t value)
  95. {
  96. LUB_HEXLED = value;
  97. }
  98. static struct gpio_chip *lubbock_misc_wr_gc;
  99. static void lubbock_set_misc_wr(unsigned int mask, unsigned int set)
  100. {
  101. unsigned long m = mask, v = set;
  102. lubbock_misc_wr_gc->set_multiple(lubbock_misc_wr_gc, &m, &v);
  103. }
  104. static int lubbock_udc_is_connected(void)
  105. {
  106. return (LUB_MISC_RD & (1 << 9)) == 0;
  107. }
  108. static struct pxa2xx_udc_mach_info udc_info __initdata = {
  109. .udc_is_connected = lubbock_udc_is_connected,
  110. // no D+ pullup; lubbock can't connect/disconnect in software
  111. };
  112. static struct resource lubbock_udc_resources[] = {
  113. DEFINE_RES_MEM(0x40600000, 0x10000),
  114. DEFINE_RES_IRQ(IRQ_USB),
  115. DEFINE_RES_IRQ(LUBBOCK_USB_IRQ),
  116. DEFINE_RES_IRQ(LUBBOCK_USB_DISC_IRQ),
  117. };
  118. /* GPIOs for SA1111 PCMCIA */
  119. static struct gpiod_lookup_table sa1111_pcmcia_gpio_table = {
  120. .dev_id = "1800",
  121. .table = {
  122. { "sa1111", 0, "a0vpp", GPIO_ACTIVE_HIGH },
  123. { "sa1111", 1, "a1vpp", GPIO_ACTIVE_HIGH },
  124. { "sa1111", 2, "a0vcc", GPIO_ACTIVE_HIGH },
  125. { "sa1111", 3, "a1vcc", GPIO_ACTIVE_HIGH },
  126. { "lubbock", 14, "b0vcc", GPIO_ACTIVE_HIGH },
  127. { "lubbock", 15, "b1vcc", GPIO_ACTIVE_HIGH },
  128. { },
  129. },
  130. };
  131. static void lubbock_init_pcmcia(void)
  132. {
  133. struct clk *clk;
  134. gpiod_add_lookup_table(&sa1111_pcmcia_gpio_table);
  135. /* Add an alias for the SA1111 PCMCIA clock */
  136. clk = clk_get_sys("pxa2xx-pcmcia", NULL);
  137. if (!IS_ERR(clk)) {
  138. clkdev_create(clk, NULL, "1800");
  139. clk_put(clk);
  140. }
  141. }
  142. static struct resource sa1111_resources[] = {
  143. [0] = {
  144. .start = 0x10000000,
  145. .end = 0x10001fff,
  146. .flags = IORESOURCE_MEM,
  147. },
  148. [1] = {
  149. .start = LUBBOCK_SA1111_IRQ,
  150. .end = LUBBOCK_SA1111_IRQ,
  151. .flags = IORESOURCE_IRQ,
  152. },
  153. };
  154. static struct sa1111_platform_data sa1111_info = {
  155. .irq_base = LUBBOCK_SA1111_IRQ_BASE,
  156. .disable_devs = SA1111_DEVID_SAC,
  157. };
  158. static struct platform_device sa1111_device = {
  159. .name = "sa1111",
  160. .id = -1,
  161. .num_resources = ARRAY_SIZE(sa1111_resources),
  162. .resource = sa1111_resources,
  163. .dev = {
  164. .platform_data = &sa1111_info,
  165. },
  166. };
  167. /* ADS7846 is connected through SSP ... and if your board has J5 populated,
  168. * you can select it to replace the ucb1400 by switching the touchscreen cable
  169. * (to J5) and poking board registers (as done below). Else it's only useful
  170. * for the temperature sensors.
  171. */
  172. static struct pxa2xx_spi_controller pxa_ssp_master_info = {
  173. .num_chipselect = 1,
  174. };
  175. static int lubbock_ads7846_pendown_state(void)
  176. {
  177. /* TS_BUSY is bit 8 in LUB_MISC_RD, but pendown is irq-only */
  178. return 0;
  179. }
  180. static struct ads7846_platform_data ads_info = {
  181. .model = 7846,
  182. .vref_delay_usecs = 100, /* internal, no cap */
  183. .get_pendown_state = lubbock_ads7846_pendown_state,
  184. // .x_plate_ohms = 500, /* GUESS! */
  185. // .y_plate_ohms = 500, /* GUESS! */
  186. };
  187. static struct gpiod_lookup_table ads7846_cs_gpios = {
  188. .dev_id = "ads7846",
  189. .table = {
  190. GPIO_LOOKUP("lubbock", 11, "cs", GPIO_ACTIVE_LOW),
  191. {}
  192. },
  193. };
  194. static struct pxa2xx_spi_chip ads_hw = {
  195. .tx_threshold = 1,
  196. .rx_threshold = 2,
  197. };
  198. static struct spi_board_info spi_board_info[] __initdata = { {
  199. .modalias = "ads7846",
  200. .platform_data = &ads_info,
  201. .controller_data = &ads_hw,
  202. .irq = LUBBOCK_BB_IRQ,
  203. .max_speed_hz = 120000 /* max sample rate at 3V */
  204. * 26 /* command + data + overhead */,
  205. .bus_num = 1,
  206. .chip_select = 0,
  207. },
  208. };
  209. static struct resource smc91x_resources[] = {
  210. [0] = {
  211. .name = "smc91x-regs",
  212. .start = 0x0c000c00,
  213. .end = 0x0c0fffff,
  214. .flags = IORESOURCE_MEM,
  215. },
  216. [1] = {
  217. .start = LUBBOCK_ETH_IRQ,
  218. .end = LUBBOCK_ETH_IRQ,
  219. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
  220. },
  221. [2] = {
  222. .name = "smc91x-attrib",
  223. .start = 0x0e000000,
  224. .end = 0x0e0fffff,
  225. .flags = IORESOURCE_MEM,
  226. },
  227. };
  228. static struct smc91x_platdata lubbock_smc91x_info = {
  229. .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_2,
  230. };
  231. static struct platform_device smc91x_device = {
  232. .name = "smc91x",
  233. .id = -1,
  234. .num_resources = ARRAY_SIZE(smc91x_resources),
  235. .resource = smc91x_resources,
  236. .dev = {
  237. .platform_data = &lubbock_smc91x_info,
  238. },
  239. };
  240. static struct resource flash_resources[] = {
  241. [0] = {
  242. .start = 0x00000000,
  243. .end = SZ_64M - 1,
  244. .flags = IORESOURCE_MEM,
  245. },
  246. [1] = {
  247. .start = 0x04000000,
  248. .end = 0x04000000 + SZ_64M - 1,
  249. .flags = IORESOURCE_MEM,
  250. },
  251. };
  252. static struct mtd_partition lubbock_partitions[] = {
  253. {
  254. .name = "Bootloader",
  255. .size = 0x00040000,
  256. .offset = 0,
  257. .mask_flags = MTD_WRITEABLE /* force read-only */
  258. },{
  259. .name = "Kernel",
  260. .size = 0x00100000,
  261. .offset = 0x00040000,
  262. },{
  263. .name = "Filesystem",
  264. .size = MTDPART_SIZ_FULL,
  265. .offset = 0x00140000
  266. }
  267. };
  268. static struct flash_platform_data lubbock_flash_data[2] = {
  269. {
  270. .map_name = "cfi_probe",
  271. .parts = lubbock_partitions,
  272. .nr_parts = ARRAY_SIZE(lubbock_partitions),
  273. }, {
  274. .map_name = "cfi_probe",
  275. .parts = NULL,
  276. .nr_parts = 0,
  277. }
  278. };
  279. static struct platform_device lubbock_flash_device[2] = {
  280. {
  281. .name = "pxa2xx-flash",
  282. .id = 0,
  283. .dev = {
  284. .platform_data = &lubbock_flash_data[0],
  285. },
  286. .resource = &flash_resources[0],
  287. .num_resources = 1,
  288. },
  289. {
  290. .name = "pxa2xx-flash",
  291. .id = 1,
  292. .dev = {
  293. .platform_data = &lubbock_flash_data[1],
  294. },
  295. .resource = &flash_resources[1],
  296. .num_resources = 1,
  297. },
  298. };
  299. static struct resource lubbock_cplds_resources[] = {
  300. [0] = {
  301. .start = LUBBOCK_FPGA_PHYS + 0xc0,
  302. .end = LUBBOCK_FPGA_PHYS + 0xe0 - 1,
  303. .flags = IORESOURCE_MEM,
  304. },
  305. [1] = {
  306. .start = PXA_GPIO_TO_IRQ(0),
  307. .end = PXA_GPIO_TO_IRQ(0),
  308. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
  309. },
  310. [2] = {
  311. .start = LUBBOCK_IRQ(0),
  312. .end = LUBBOCK_IRQ(6),
  313. .flags = IORESOURCE_IRQ,
  314. },
  315. };
  316. static struct platform_device lubbock_cplds_device = {
  317. .name = "pxa_cplds_irqs",
  318. .id = -1,
  319. .resource = &lubbock_cplds_resources[0],
  320. .num_resources = 3,
  321. };
  322. static struct platform_device *devices[] __initdata = {
  323. &sa1111_device,
  324. &smc91x_device,
  325. &lubbock_flash_device[0],
  326. &lubbock_flash_device[1],
  327. &lubbock_cplds_device,
  328. };
  329. static struct pxafb_mode_info sharp_lm8v31_mode = {
  330. .pixclock = 270000,
  331. .xres = 640,
  332. .yres = 480,
  333. .bpp = 16,
  334. .hsync_len = 1,
  335. .left_margin = 3,
  336. .right_margin = 3,
  337. .vsync_len = 1,
  338. .upper_margin = 0,
  339. .lower_margin = 0,
  340. .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
  341. .cmap_greyscale = 0,
  342. };
  343. static struct pxafb_mach_info sharp_lm8v31 = {
  344. .modes = &sharp_lm8v31_mode,
  345. .num_modes = 1,
  346. .cmap_inverse = 0,
  347. .cmap_static = 0,
  348. .lcd_conn = LCD_COLOR_DSTN_16BPP | LCD_PCLK_EDGE_FALL |
  349. LCD_AC_BIAS_FREQ(255),
  350. };
  351. #define MMC_POLL_RATE msecs_to_jiffies(1000)
  352. static irq_handler_t mmc_detect_int;
  353. static void *mmc_detect_int_data;
  354. static struct timer_list mmc_timer;
  355. static void lubbock_mmc_poll(struct timer_list *unused)
  356. {
  357. unsigned long flags;
  358. /* clear any previous irq state, then ... */
  359. local_irq_save(flags);
  360. LUB_IRQ_SET_CLR &= ~(1 << 0);
  361. local_irq_restore(flags);
  362. /* poll until mmc/sd card is removed */
  363. if (LUB_IRQ_SET_CLR & (1 << 0))
  364. mod_timer(&mmc_timer, jiffies + MMC_POLL_RATE);
  365. else {
  366. (void) mmc_detect_int(LUBBOCK_SD_IRQ, mmc_detect_int_data);
  367. enable_irq(LUBBOCK_SD_IRQ);
  368. }
  369. }
  370. static irqreturn_t lubbock_detect_int(int irq, void *data)
  371. {
  372. /* IRQ is level triggered; disable, and poll for removal */
  373. disable_irq(irq);
  374. mod_timer(&mmc_timer, jiffies + MMC_POLL_RATE);
  375. return mmc_detect_int(irq, data);
  376. }
  377. static int lubbock_mci_init(struct device *dev,
  378. irq_handler_t detect_int,
  379. void *data)
  380. {
  381. /* detect card insert/eject */
  382. mmc_detect_int = detect_int;
  383. mmc_detect_int_data = data;
  384. timer_setup(&mmc_timer, lubbock_mmc_poll, 0);
  385. return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int,
  386. 0, "lubbock-sd-detect", data);
  387. }
  388. static int lubbock_mci_get_ro(struct device *dev)
  389. {
  390. return (LUB_MISC_RD & (1 << 2)) != 0;
  391. }
  392. static void lubbock_mci_exit(struct device *dev, void *data)
  393. {
  394. free_irq(LUBBOCK_SD_IRQ, data);
  395. del_timer_sync(&mmc_timer);
  396. }
  397. static struct pxamci_platform_data lubbock_mci_platform_data = {
  398. .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
  399. .detect_delay_ms = 10,
  400. .init = lubbock_mci_init,
  401. .get_ro = lubbock_mci_get_ro,
  402. .exit = lubbock_mci_exit,
  403. };
  404. static void lubbock_irda_transceiver_mode(struct device *dev, int mode)
  405. {
  406. unsigned long flags;
  407. local_irq_save(flags);
  408. if (mode & IR_SIRMODE) {
  409. lubbock_set_misc_wr(BIT(4), 0);
  410. } else if (mode & IR_FIRMODE) {
  411. lubbock_set_misc_wr(BIT(4), BIT(4));
  412. }
  413. pxa2xx_transceiver_mode(dev, mode);
  414. local_irq_restore(flags);
  415. }
  416. static struct pxaficp_platform_data lubbock_ficp_platform_data = {
  417. .gpio_pwdown = -1,
  418. .transceiver_cap = IR_SIRMODE | IR_FIRMODE,
  419. .transceiver_mode = lubbock_irda_transceiver_mode,
  420. };
  421. static void __init lubbock_init(void)
  422. {
  423. int flashboot = (LUB_CONF_SWITCHES & 1);
  424. pxa2xx_mfp_config(ARRAY_AND_SIZE(lubbock_pin_config));
  425. lubbock_misc_wr_gc = gpio_reg_init(NULL, (void *)&LUB_MISC_WR,
  426. -1, 16, "lubbock", 0, LUB_MISC_WR,
  427. NULL, NULL, NULL);
  428. if (IS_ERR(lubbock_misc_wr_gc)) {
  429. pr_err("Lubbock: unable to register lubbock GPIOs: %ld\n",
  430. PTR_ERR(lubbock_misc_wr_gc));
  431. lubbock_misc_wr_gc = NULL;
  432. }
  433. pxa_set_ffuart_info(NULL);
  434. pxa_set_btuart_info(NULL);
  435. pxa_set_stuart_info(NULL);
  436. lubbock_init_pcmcia();
  437. clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL);
  438. /* lubbock has two extra IRQs */
  439. pxa25x_device_udc.resource = lubbock_udc_resources;
  440. pxa25x_device_udc.num_resources = ARRAY_SIZE(lubbock_udc_resources);
  441. pxa_set_udc_info(&udc_info);
  442. pxa_set_fb_info(NULL, &sharp_lm8v31);
  443. pxa_set_mci_info(&lubbock_mci_platform_data);
  444. pxa_set_ficp_info(&lubbock_ficp_platform_data);
  445. pxa_set_ac97_info(NULL);
  446. lubbock_flash_data[0].width = lubbock_flash_data[1].width =
  447. (__raw_readl(BOOT_DEF) & 1) ? 2 : 4;
  448. /* Compensate for the nROMBT switch which swaps the flash banks */
  449. printk(KERN_NOTICE "Lubbock configured to boot from %s (bank %d)\n",
  450. flashboot?"Flash":"ROM", flashboot);
  451. lubbock_flash_data[flashboot^1].name = "application-flash";
  452. lubbock_flash_data[flashboot].name = "boot-rom";
  453. (void) platform_add_devices(devices, ARRAY_SIZE(devices));
  454. gpiod_add_lookup_table(&ads7846_cs_gpios);
  455. pxa2xx_set_spi_info(1, &pxa_ssp_master_info);
  456. spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
  457. }
  458. static struct map_desc lubbock_io_desc[] __initdata = {
  459. { /* CPLD */
  460. .virtual = LUBBOCK_FPGA_VIRT,
  461. .pfn = __phys_to_pfn(LUBBOCK_FPGA_PHYS),
  462. .length = 0x00100000,
  463. .type = MT_DEVICE
  464. }
  465. };
  466. static void __init lubbock_map_io(void)
  467. {
  468. pxa25x_map_io();
  469. iotable_init(lubbock_io_desc, ARRAY_SIZE(lubbock_io_desc));
  470. PCFR |= PCFR_OPDE;
  471. }
  472. /*
  473. * Driver for the 8 discrete LEDs available for general use:
  474. * Note: bits [15-8] are used to enable/blank the 8 7 segment hex displays
  475. * so be sure to not monkey with them here.
  476. */
  477. #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
  478. struct lubbock_led {
  479. struct led_classdev cdev;
  480. u8 mask;
  481. };
  482. /*
  483. * The triggers lines up below will only be used if the
  484. * LED triggers are compiled in.
  485. */
  486. static const struct {
  487. const char *name;
  488. const char *trigger;
  489. } lubbock_leds[] = {
  490. { "lubbock:D28", "default-on", },
  491. { "lubbock:D27", "cpu0", },
  492. { "lubbock:D26", "heartbeat" },
  493. { "lubbock:D25", },
  494. { "lubbock:D24", },
  495. { "lubbock:D23", },
  496. { "lubbock:D22", },
  497. { "lubbock:D21", },
  498. };
  499. static void lubbock_led_set(struct led_classdev *cdev,
  500. enum led_brightness b)
  501. {
  502. struct lubbock_led *led = container_of(cdev,
  503. struct lubbock_led, cdev);
  504. u32 reg = LUB_DISC_BLNK_LED;
  505. if (b != LED_OFF)
  506. reg |= led->mask;
  507. else
  508. reg &= ~led->mask;
  509. LUB_DISC_BLNK_LED = reg;
  510. }
  511. static enum led_brightness lubbock_led_get(struct led_classdev *cdev)
  512. {
  513. struct lubbock_led *led = container_of(cdev,
  514. struct lubbock_led, cdev);
  515. u32 reg = LUB_DISC_BLNK_LED;
  516. return (reg & led->mask) ? LED_FULL : LED_OFF;
  517. }
  518. static int __init lubbock_leds_init(void)
  519. {
  520. int i;
  521. if (!machine_is_lubbock())
  522. return -ENODEV;
  523. /* All ON */
  524. LUB_DISC_BLNK_LED |= 0xff;
  525. for (i = 0; i < ARRAY_SIZE(lubbock_leds); i++) {
  526. struct lubbock_led *led;
  527. led = kzalloc(sizeof(*led), GFP_KERNEL);
  528. if (!led)
  529. break;
  530. led->cdev.name = lubbock_leds[i].name;
  531. led->cdev.brightness_set = lubbock_led_set;
  532. led->cdev.brightness_get = lubbock_led_get;
  533. led->cdev.default_trigger = lubbock_leds[i].trigger;
  534. led->mask = BIT(i);
  535. if (led_classdev_register(NULL, &led->cdev) < 0) {
  536. kfree(led);
  537. break;
  538. }
  539. }
  540. return 0;
  541. }
  542. /*
  543. * Since we may have triggers on any subsystem, defer registration
  544. * until after subsystem_init.
  545. */
  546. fs_initcall(lubbock_leds_init);
  547. #endif
  548. MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)")
  549. /* Maintainer: MontaVista Software Inc. */
  550. .map_io = lubbock_map_io,
  551. .nr_irqs = LUBBOCK_NR_IRQS,
  552. .init_irq = pxa25x_init_irq,
  553. .handle_irq = pxa25x_handle_irq,
  554. .init_time = pxa_timer_init,
  555. .init_machine = lubbock_init,
  556. .restart = pxa_restart,
  557. MACHINE_END