15 #include <linux/module.h>
16 #include <linux/kernel.h>
27 #include <linux/slab.h>
34 #include <asm/setup.h>
35 #include <asm/memory.h>
37 #include <mach/hardware.h>
39 #include <asm/sizes.h>
62 static unsigned long lubbock_pin_config[]
__initdata = {
108 #define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
109 #define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
126 static unsigned long lubbock_irq_enabled;
128 static void lubbock_mask_irq(
struct irq_data *
d)
134 static void lubbock_unmask_irq(
struct irq_data *
d)
142 static struct irq_chip lubbock_irq_chip = {
144 .irq_ack = lubbock_mask_irq,
145 .irq_mask = lubbock_mask_irq,
146 .irq_unmask = lubbock_unmask_irq,
149 static void lubbock_irq_handler(
unsigned int irq,
struct irq_desc *
desc)
163 static void __init lubbock_init_irq(
void)
171 irq_set_chip_and_handler(irq, &lubbock_irq_chip,
182 static void lubbock_irq_resume(
void)
187 static struct syscore_ops lubbock_irq_syscore_ops = {
188 .
resume = lubbock_irq_resume,
191 static int __init lubbock_irq_device_init(
void)
193 if (machine_is_lubbock()) {
204 static int lubbock_udc_is_connected(
void)
210 .udc_is_connected = lubbock_udc_is_connected,
214 static struct resource sa1111_resources[] = {
235 .num_resources =
ARRAY_SIZE(sa1111_resources),
236 .resource = sa1111_resources,
238 .platform_data = &sa1111_info,
251 static int lubbock_ads7846_pendown_state(
void)
259 .vref_delay_usecs = 100,
260 .get_pendown_state = lubbock_ads7846_pendown_state,
267 static const unsigned TS_nCS = 1 << 11;
274 .cs_control = ads7846_cs,
278 .modalias =
"ads7846",
279 .platform_data = &ads_info,
280 .controller_data = &ads_hw,
282 .max_speed_hz = 120000
289 static struct resource smc91x_resources[] = {
291 .name =
"smc91x-regs",
302 .name =
"smc91x-attrib",
316 .num_resources =
ARRAY_SIZE(smc91x_resources),
317 .resource = smc91x_resources,
319 .platform_data = &lubbock_smc91x_info,
323 static struct resource flash_resources[] = {
331 .end = 0x04000000 +
SZ_64M - 1,
338 .name =
"Bootloader",
345 .offset = 0x00040000,
347 .name =
"Filesystem",
355 .map_name =
"cfi_probe",
356 .parts = lubbock_partitions,
359 .map_name =
"cfi_probe",
367 .name =
"pxa2xx-flash",
370 .platform_data = &lubbock_flash_data[0],
372 .resource = &flash_resources[0],
376 .
name =
"pxa2xx-flash",
379 .platform_data = &lubbock_flash_data[1],
381 .resource = &flash_resources[1],
389 &lubbock_flash_device[0],
390 &lubbock_flash_device[1],
409 .modes = &sharp_lm8v31_mode,
417 #define MMC_POLL_RATE msecs_to_jiffies(1000)
419 static void lubbock_mmc_poll(
unsigned long);
423 .function = lubbock_mmc_poll,
426 static void lubbock_mmc_poll(
unsigned long data)
444 static irqreturn_t lubbock_detect_int(
int irq,
void *data)
450 return mmc_detect_int(irq, data);
453 static int lubbock_mci_init(
struct device *
dev,
458 mmc_detect_int = detect_int;
460 mmc_timer.
data = (
unsigned long) data;
462 0,
"lubbock-sd-detect", data);
465 static int lubbock_mci_get_ro(
struct device *
dev)
470 static void lubbock_mci_exit(
struct device *dev,
void *data)
478 .detect_delay_ms = 10,
479 .init = lubbock_mci_init,
480 .get_ro = lubbock_mci_get_ro,
481 .exit = lubbock_mci_exit,
482 .gpio_card_detect = -1,
487 static void lubbock_irda_transceiver_mode(
struct device *dev,
int mode)
504 .transceiver_mode = lubbock_irda_transceiver_mode,
507 static void __init lubbock_init(
void)
524 lubbock_flash_data[0].
width = lubbock_flash_data[1].
width =
528 flashboot?
"Flash":
"ROM", flashboot);
530 lubbock_flash_data[flashboot^1].
name =
"application-flash";
531 lubbock_flash_data[flashboot].
name =
"boot-rom";
538 static struct map_desc lubbock_io_desc[] __initdata = {
542 .length = 0x00100000,
547 static void __init lubbock_map_io(
void)
561 #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
571 static const struct {
575 {
"lubbock:D28",
"default-on", },
576 {
"lubbock:D27",
"cpu0", },
577 {
"lubbock:D26",
"heartbeat" },
589 struct lubbock_led, cdev);
603 struct lubbock_led, cdev);
609 static int __init lubbock_leds_init(
void)
613 if (!machine_is_lubbock())
618 for (i = 0; i <
ARRAY_SIZE(lubbock_leds); i++) {
619 struct lubbock_led *
led;
625 led->cdev.name = lubbock_leds[
i].name;
626 led->cdev.brightness_set = lubbock_led_set;
627 led->cdev.brightness_get = lubbock_led_get;
628 led->cdev.default_trigger = lubbock_leds[
i].trigger;
647 MACHINE_START(LUBBOCK,
"Intel DBPXA250 Development Platform (aka Lubbock)")
649 .map_io = lubbock_map_io,
651 .init_irq = lubbock_init_irq,
654 .init_machine = lubbock_init,