Blackfin arch: Modify bfin_sir device configuration to board file
[linux-2.6/btrfs-unstable.git] / arch / blackfin / mach-bf537 / boards / stamp.c
blob980121b7e084a57bcd68efa70768d09bd111931a
1 /*
2 * File: arch/blackfin/mach-bf537/boards/stamp.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
6 * Created:
7 * Description:
9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2006 Analog Devices Inc.
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #include <linux/device.h>
32 #include <linux/kernel.h>
33 #include <linux/platform_device.h>
34 #include <linux/mtd/mtd.h>
35 #include <linux/mtd/nand.h>
36 #include <linux/mtd/partitions.h>
37 #include <linux/mtd/plat-ram.h>
38 #include <linux/mtd/physmap.h>
39 #include <linux/spi/spi.h>
40 #include <linux/spi/flash.h>
41 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
42 #include <linux/usb/isp1362.h>
43 #endif
44 #include <linux/ata_platform.h>
45 #include <linux/irq.h>
46 #include <linux/interrupt.h>
47 #include <linux/i2c.h>
48 #include <linux/usb/sl811.h>
49 #include <linux/spi/mmc_spi.h>
50 #include <asm/dma.h>
51 #include <asm/bfin5xx_spi.h>
52 #include <asm/reboot.h>
53 #include <asm/portmux.h>
54 #include <asm/dpmc.h>
57 * Name the Board for the /proc/cpuinfo
59 const char bfin_board_name[] = "ADI BF537-STAMP";
62 * Driver needs to know address, irq and flag pin.
65 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
66 #include <linux/usb/isp1760.h>
67 static struct resource bfin_isp1760_resources[] = {
68 [0] = {
69 .start = 0x203C0000,
70 .end = 0x203C0000 + 0x000fffff,
71 .flags = IORESOURCE_MEM,
73 [1] = {
74 .start = IRQ_PF7,
75 .end = IRQ_PF7,
76 .flags = IORESOURCE_IRQ,
80 static struct isp1760_platform_data isp1760_priv = {
81 .is_isp1761 = 0,
82 .port1_disable = 0,
83 .bus_width_16 = 1,
84 .port1_otg = 0,
85 .analog_oc = 0,
86 .dack_polarity_high = 0,
87 .dreq_polarity_high = 0,
90 static struct platform_device bfin_isp1760_device = {
91 .name = "isp1760-hcd",
92 .id = 0,
93 .dev = {
94 .platform_data = &isp1760_priv,
96 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
97 .resource = bfin_isp1760_resources,
99 #endif
101 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
102 #include <linux/input.h>
103 #include <linux/gpio_keys.h>
105 static struct gpio_keys_button bfin_gpio_keys_table[] = {
106 {BTN_0, GPIO_PF2, 1, "gpio-keys: BTN0"},
107 {BTN_1, GPIO_PF3, 1, "gpio-keys: BTN1"},
108 {BTN_2, GPIO_PF4, 1, "gpio-keys: BTN2"},
109 {BTN_3, GPIO_PF5, 1, "gpio-keys: BTN3"},
112 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
113 .buttons = bfin_gpio_keys_table,
114 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
117 static struct platform_device bfin_device_gpiokeys = {
118 .name = "gpio-keys",
119 .dev = {
120 .platform_data = &bfin_gpio_keys_data,
123 #endif
125 static struct resource bfin_gpios_resources = {
126 .start = 0,
127 .end = MAX_BLACKFIN_GPIOS - 1,
128 .flags = IORESOURCE_IRQ,
131 static struct platform_device bfin_gpios_device = {
132 .name = "simple-gpio",
133 .id = -1,
134 .num_resources = 1,
135 .resource = &bfin_gpios_resources,
138 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
139 static struct resource bfin_pcmcia_cf_resources[] = {
141 .start = 0x20310000, /* IO PORT */
142 .end = 0x20312000,
143 .flags = IORESOURCE_MEM,
144 }, {
145 .start = 0x20311000, /* Attribute Memory */
146 .end = 0x20311FFF,
147 .flags = IORESOURCE_MEM,
148 }, {
149 .start = IRQ_PF4,
150 .end = IRQ_PF4,
151 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
152 }, {
153 .start = 6, /* Card Detect PF6 */
154 .end = 6,
155 .flags = IORESOURCE_IRQ,
159 static struct platform_device bfin_pcmcia_cf_device = {
160 .name = "bfin_cf_pcmcia",
161 .id = -1,
162 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
163 .resource = bfin_pcmcia_cf_resources,
165 #endif
167 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
168 static struct platform_device rtc_device = {
169 .name = "rtc-bfin",
170 .id = -1,
172 #endif
174 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
175 static struct resource smc91x_resources[] = {
177 .name = "smc91x-regs",
178 .start = 0x20300300,
179 .end = 0x20300300 + 16,
180 .flags = IORESOURCE_MEM,
181 }, {
183 .start = IRQ_PF7,
184 .end = IRQ_PF7,
185 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
188 static struct platform_device smc91x_device = {
189 .name = "smc91x",
190 .id = 0,
191 .num_resources = ARRAY_SIZE(smc91x_resources),
192 .resource = smc91x_resources,
194 #endif
196 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
197 static struct resource dm9000_resources[] = {
198 [0] = {
199 .start = 0x203FB800,
200 .end = 0x203FB800 + 8,
201 .flags = IORESOURCE_MEM,
203 [1] = {
204 .start = IRQ_PF9,
205 .end = IRQ_PF9,
206 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
210 static struct platform_device dm9000_device = {
211 .name = "dm9000",
212 .id = -1,
213 .num_resources = ARRAY_SIZE(dm9000_resources),
214 .resource = dm9000_resources,
216 #endif
218 #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
219 static struct resource ax88180_resources[] = {
220 [0] = {
221 .start = 0x20300000,
222 .end = 0x20300000 + 0x8000,
223 .flags = IORESOURCE_MEM,
225 [1] = {
226 .start = IRQ_PF7,
227 .end = IRQ_PF7,
228 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL),
232 static struct platform_device ax88180_device = {
233 .name = "ax88180",
234 .id = -1,
235 .num_resources = ARRAY_SIZE(ax88180_resources),
236 .resource = ax88180_resources,
238 #endif
240 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
241 static struct resource sl811_hcd_resources[] = {
243 .start = 0x20340000,
244 .end = 0x20340000,
245 .flags = IORESOURCE_MEM,
246 }, {
247 .start = 0x20340004,
248 .end = 0x20340004,
249 .flags = IORESOURCE_MEM,
250 }, {
251 .start = CONFIG_USB_SL811_BFIN_IRQ,
252 .end = CONFIG_USB_SL811_BFIN_IRQ,
253 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
257 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
258 void sl811_port_power(struct device *dev, int is_on)
260 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
261 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
263 #endif
265 static struct sl811_platform_data sl811_priv = {
266 .potpg = 10,
267 .power = 250, /* == 500mA */
268 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
269 .port_power = &sl811_port_power,
270 #endif
273 static struct platform_device sl811_hcd_device = {
274 .name = "sl811-hcd",
275 .id = 0,
276 .dev = {
277 .platform_data = &sl811_priv,
279 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
280 .resource = sl811_hcd_resources,
282 #endif
284 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
285 static struct resource isp1362_hcd_resources[] = {
287 .start = 0x20360000,
288 .end = 0x20360000,
289 .flags = IORESOURCE_MEM,
290 }, {
291 .start = 0x20360004,
292 .end = 0x20360004,
293 .flags = IORESOURCE_MEM,
294 }, {
295 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
296 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
297 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
301 static struct isp1362_platform_data isp1362_priv = {
302 .sel15Kres = 1,
303 .clknotstop = 0,
304 .oc_enable = 0,
305 .int_act_high = 0,
306 .int_edge_triggered = 0,
307 .remote_wakeup_connected = 0,
308 .no_power_switching = 1,
309 .power_switching_mode = 0,
312 static struct platform_device isp1362_hcd_device = {
313 .name = "isp1362-hcd",
314 .id = 0,
315 .dev = {
316 .platform_data = &isp1362_priv,
318 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
319 .resource = isp1362_hcd_resources,
321 #endif
323 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
324 static struct platform_device bfin_mac_device = {
325 .name = "bfin_mac",
327 #endif
329 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
330 static struct resource net2272_bfin_resources[] = {
332 .start = 0x20300000,
333 .end = 0x20300000 + 0x100,
334 .flags = IORESOURCE_MEM,
335 }, {
336 .start = IRQ_PF7,
337 .end = IRQ_PF7,
338 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
342 static struct platform_device net2272_bfin_device = {
343 .name = "net2272",
344 .id = -1,
345 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
346 .resource = net2272_bfin_resources,
348 #endif
350 #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
351 #ifdef CONFIG_MTD_PARTITIONS
352 const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
354 static struct mtd_partition bfin_plat_nand_partitions[] = {
356 .name = "linux kernel(nand)",
357 .size = 0x400000,
358 .offset = 0,
359 }, {
360 .name = "file system(nand)",
361 .size = MTDPART_SIZ_FULL,
362 .offset = MTDPART_OFS_APPEND,
365 #endif
367 #define BFIN_NAND_PLAT_CLE 2
368 #define BFIN_NAND_PLAT_ALE 1
369 static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
371 struct nand_chip *this = mtd->priv;
373 if (cmd == NAND_CMD_NONE)
374 return;
376 if (ctrl & NAND_CLE)
377 writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE));
378 else
379 writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE));
382 #define BFIN_NAND_PLAT_READY GPIO_PF3
383 static int bfin_plat_nand_dev_ready(struct mtd_info *mtd)
385 return gpio_get_value(BFIN_NAND_PLAT_READY);
388 static struct platform_nand_data bfin_plat_nand_data = {
389 .chip = {
390 .chip_delay = 30,
391 #ifdef CONFIG_MTD_PARTITIONS
392 .part_probe_types = part_probes,
393 .partitions = bfin_plat_nand_partitions,
394 .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions),
395 #endif
397 .ctrl = {
398 .cmd_ctrl = bfin_plat_nand_cmd_ctrl,
399 .dev_ready = bfin_plat_nand_dev_ready,
403 #define MAX(x, y) (x > y ? x : y)
404 static struct resource bfin_plat_nand_resources = {
405 .start = 0x20212000,
406 .end = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),
407 .flags = IORESOURCE_IO,
410 static struct platform_device bfin_async_nand_device = {
411 .name = "gen_nand",
412 .id = -1,
413 .num_resources = 1,
414 .resource = &bfin_plat_nand_resources,
415 .dev = {
416 .platform_data = &bfin_plat_nand_data,
420 static void bfin_plat_nand_init(void)
422 gpio_request(BFIN_NAND_PLAT_READY, "bfin_nand_plat");
424 #else
425 static void bfin_plat_nand_init(void) {}
426 #endif
428 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
429 static struct mtd_partition stamp_partitions[] = {
431 .name = "bootloader(nor)",
432 .size = 0x40000,
433 .offset = 0,
434 }, {
435 .name = "linux kernel(nor)",
436 .size = 0xE0000,
437 .offset = MTDPART_OFS_APPEND,
438 }, {
439 .name = "file system(nor)",
440 .size = 0x400000 - 0x40000 - 0xE0000 - 0x10000,
441 .offset = MTDPART_OFS_APPEND,
442 }, {
443 .name = "MAC Address(nor)",
444 .size = MTDPART_SIZ_FULL,
445 .offset = 0x3F0000,
446 .mask_flags = MTD_WRITEABLE,
450 static struct physmap_flash_data stamp_flash_data = {
451 .width = 2,
452 .parts = stamp_partitions,
453 .nr_parts = ARRAY_SIZE(stamp_partitions),
456 static struct resource stamp_flash_resource = {
457 .start = 0x20000000,
458 .end = 0x203fffff,
459 .flags = IORESOURCE_MEM,
462 static struct platform_device stamp_flash_device = {
463 .name = "physmap-flash",
464 .id = 0,
465 .dev = {
466 .platform_data = &stamp_flash_data,
468 .num_resources = 1,
469 .resource = &stamp_flash_resource,
471 #endif
473 #if defined(CONFIG_MTD_M25P80) \
474 || defined(CONFIG_MTD_M25P80_MODULE)
475 static struct mtd_partition bfin_spi_flash_partitions[] = {
477 .name = "bootloader(spi)",
478 .size = 0x00040000,
479 .offset = 0,
480 .mask_flags = MTD_CAP_ROM
481 }, {
482 .name = "linux kernel(spi)",
483 .size = 0xe0000,
484 .offset = MTDPART_OFS_APPEND,
485 }, {
486 .name = "file system(spi)",
487 .size = MTDPART_SIZ_FULL,
488 .offset = MTDPART_OFS_APPEND,
492 static struct flash_platform_data bfin_spi_flash_data = {
493 .name = "m25p80",
494 .parts = bfin_spi_flash_partitions,
495 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
496 /* .type = "m25p64", */
499 /* SPI flash chip (m25p64) */
500 static struct bfin5xx_spi_chip spi_flash_chip_info = {
501 .enable_dma = 0, /* use dma transfer with this chip*/
502 .bits_per_word = 8,
504 #endif
506 #if defined(CONFIG_SPI_ADC_BF533) \
507 || defined(CONFIG_SPI_ADC_BF533_MODULE)
508 /* SPI ADC chip */
509 static struct bfin5xx_spi_chip spi_adc_chip_info = {
510 .enable_dma = 1, /* use dma transfer with this chip*/
511 .bits_per_word = 16,
513 #endif
515 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
516 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
517 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
518 .enable_dma = 0,
519 .bits_per_word = 16,
521 #endif
523 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
524 static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
525 .enable_dma = 0,
526 .bits_per_word = 16,
528 #endif
530 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
531 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5
533 static int bfin_mmc_spi_init(struct device *dev,
534 irqreturn_t (*detect_int)(int, void *), void *data)
536 return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int,
537 IRQF_TRIGGER_FALLING, "mmc-spi-detect", data);
540 static void bfin_mmc_spi_exit(struct device *dev, void *data)
542 free_irq(MMC_SPI_CARD_DETECT_INT, data);
545 static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
546 .init = bfin_mmc_spi_init,
547 .exit = bfin_mmc_spi_exit,
548 .detect_delay = 100, /* msecs */
551 static struct bfin5xx_spi_chip mmc_spi_chip_info = {
552 .enable_dma = 0,
553 .bits_per_word = 8,
555 #endif
557 #if defined(CONFIG_PBX)
558 static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
559 .ctl_reg = 0x4, /* send zero */
560 .enable_dma = 0,
561 .bits_per_word = 8,
562 .cs_change_per_word = 1,
564 #endif
566 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
567 #include <linux/spi/ad7877.h>
568 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
569 .enable_dma = 0,
570 .bits_per_word = 16,
573 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
574 .model = 7877,
575 .vref_delay_usecs = 50, /* internal, no capacitor */
576 .x_plate_ohms = 419,
577 .y_plate_ohms = 486,
578 .pressure_max = 1000,
579 .pressure_min = 0,
580 .stopacq_polarity = 1,
581 .first_conversion_delay = 3,
582 .acquisition_time = 1,
583 .averaging = 1,
584 .pen_down_acc_interval = 1,
586 #endif
588 #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
589 #include <linux/spi/ad7879.h>
590 static const struct ad7879_platform_data bfin_ad7879_ts_info = {
591 .model = 7879, /* Model = AD7879 */
592 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
593 .pressure_max = 10000,
594 .pressure_min = 0,
595 .first_conversion_delay = 3, /* wait 512us before do a first conversion */
596 .acquisition_time = 1, /* 4us acquisition time per sample */
597 .median = 2, /* do 8 measurements */
598 .averaging = 1, /* take the average of 4 middle samples */
599 .pen_down_acc_interval = 255, /* 9.4 ms */
600 .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */
601 .gpio_default = 1, /* During initialization set GPIO = HIGH */
603 #endif
605 #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
606 static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
607 .enable_dma = 0,
608 .bits_per_word = 16,
610 #endif
612 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
613 static struct bfin5xx_spi_chip spidev_chip_info = {
614 .enable_dma = 0,
615 .bits_per_word = 8,
617 #endif
619 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
620 static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
621 .enable_dma = 0,
622 .bits_per_word = 8,
624 #endif
626 #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
627 static struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
628 .enable_dma = 1,
629 .bits_per_word = 8,
630 .cs_gpio = GPIO_PF10,
632 #endif
634 #if defined(CONFIG_MTD_DATAFLASH) \
635 || defined(CONFIG_MTD_DATAFLASH_MODULE)
637 static struct mtd_partition bfin_spi_dataflash_partitions[] = {
639 .name = "bootloader(spi)",
640 .size = 0x00040000,
641 .offset = 0,
642 .mask_flags = MTD_CAP_ROM
643 }, {
644 .name = "linux kernel(spi)",
645 .size = 0xe0000,
646 .offset = MTDPART_OFS_APPEND,
647 }, {
648 .name = "file system(spi)",
649 .size = MTDPART_SIZ_FULL,
650 .offset = MTDPART_OFS_APPEND,
654 static struct flash_platform_data bfin_spi_dataflash_data = {
655 .name = "SPI Dataflash",
656 .parts = bfin_spi_dataflash_partitions,
657 .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
660 /* DataFlash chip */
661 static struct bfin5xx_spi_chip data_flash_chip_info = {
662 .enable_dma = 0, /* use dma transfer with this chip*/
663 .bits_per_word = 8,
665 #endif
667 static struct spi_board_info bfin_spi_board_info[] __initdata = {
668 #if defined(CONFIG_MTD_M25P80) \
669 || defined(CONFIG_MTD_M25P80_MODULE)
671 /* the modalias must be the same as spi device driver name */
672 .modalias = "m25p80", /* Name of spi_driver for this device */
673 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
674 .bus_num = 0, /* Framework bus number */
675 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
676 .platform_data = &bfin_spi_flash_data,
677 .controller_data = &spi_flash_chip_info,
678 .mode = SPI_MODE_3,
680 #endif
681 #if defined(CONFIG_MTD_DATAFLASH) \
682 || defined(CONFIG_MTD_DATAFLASH_MODULE)
683 { /* DataFlash chip */
684 .modalias = "mtd_dataflash",
685 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */
686 .bus_num = 0, /* Framework bus number */
687 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
688 .platform_data = &bfin_spi_dataflash_data,
689 .controller_data = &data_flash_chip_info,
690 .mode = SPI_MODE_3,
692 #endif
693 #if defined(CONFIG_SPI_ADC_BF533) \
694 || defined(CONFIG_SPI_ADC_BF533_MODULE)
696 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
697 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
698 .bus_num = 0, /* Framework bus number */
699 .chip_select = 1, /* Framework chip select. */
700 .platform_data = NULL, /* No spi_driver specific config */
701 .controller_data = &spi_adc_chip_info,
703 #endif
705 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
706 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
708 .modalias = "ad1836-spi",
709 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
710 .bus_num = 0,
711 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
712 .controller_data = &ad1836_spi_chip_info,
714 #endif
715 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
717 .modalias = "ad9960-spi",
718 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
719 .bus_num = 0,
720 .chip_select = 1,
721 .controller_data = &ad9960_spi_chip_info,
723 #endif
724 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
726 .modalias = "mmc_spi",
727 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
728 .bus_num = 0,
729 .chip_select = 4,
730 .platform_data = &bfin_mmc_spi_pdata,
731 .controller_data = &mmc_spi_chip_info,
732 .mode = SPI_MODE_3,
734 #endif
735 #if defined(CONFIG_PBX)
737 .modalias = "fxs-spi",
738 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
739 .bus_num = 0,
740 .chip_select = 8 - CONFIG_J11_JUMPER,
741 .controller_data = &spi_si3xxx_chip_info,
742 .mode = SPI_MODE_3,
745 .modalias = "fxo-spi",
746 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
747 .bus_num = 0,
748 .chip_select = 8 - CONFIG_J19_JUMPER,
749 .controller_data = &spi_si3xxx_chip_info,
750 .mode = SPI_MODE_3,
752 #endif
753 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
755 .modalias = "ad7877",
756 .platform_data = &bfin_ad7877_ts_info,
757 .irq = IRQ_PF6,
758 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
759 .bus_num = 0,
760 .chip_select = 1,
761 .controller_data = &spi_ad7877_chip_info,
763 #endif
764 #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
766 .modalias = "ad7879",
767 .platform_data = &bfin_ad7879_ts_info,
768 .irq = IRQ_PF7,
769 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
770 .bus_num = 0,
771 .chip_select = 1,
772 .controller_data = &spi_ad7879_chip_info,
773 .mode = SPI_CPHA | SPI_CPOL,
775 #endif
776 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
778 .modalias = "spidev",
779 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
780 .bus_num = 0,
781 .chip_select = 1,
782 .controller_data = &spidev_chip_info,
784 #endif
785 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
787 .modalias = "bfin-lq035q1-spi",
788 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
789 .bus_num = 0,
790 .chip_select = 2,
791 .controller_data = &lq035q1_spi_chip_info,
792 .mode = SPI_CPHA | SPI_CPOL,
794 #endif
795 #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
797 .modalias = "enc28j60",
798 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
799 .irq = IRQ_PF6,
800 .bus_num = 0,
801 .chip_select = 0, /* GPIO controlled SSEL */
802 .controller_data = &enc28j60_spi_chip_info,
803 .mode = SPI_MODE_0,
805 #endif
808 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
809 /* SPI controller data */
810 static struct bfin5xx_spi_master bfin_spi0_info = {
811 .num_chipselect = 8,
812 .enable_dma = 1, /* master has the ability to do dma transfer */
813 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
816 /* SPI (0) */
817 static struct resource bfin_spi0_resource[] = {
818 [0] = {
819 .start = SPI0_REGBASE,
820 .end = SPI0_REGBASE + 0xFF,
821 .flags = IORESOURCE_MEM,
823 [1] = {
824 .start = CH_SPI,
825 .end = CH_SPI,
826 .flags = IORESOURCE_IRQ,
830 static struct platform_device bfin_spi0_device = {
831 .name = "bfin-spi",
832 .id = 0, /* Bus number */
833 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
834 .resource = bfin_spi0_resource,
835 .dev = {
836 .platform_data = &bfin_spi0_info, /* Passed to driver */
839 #endif /* spi master and devices */
841 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
842 static struct platform_device bfin_fb_device = {
843 .name = "bf537-lq035",
845 #endif
847 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
848 static struct platform_device bfin_fb_adv7393_device = {
849 .name = "bfin-adv7393",
851 #endif
853 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
854 #include <asm/bfin-lq035q1.h>
856 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
857 .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
858 .use_bl = 0, /* let something else control the LCD Blacklight */
859 .gpio_bl = GPIO_PF7,
862 static struct resource bfin_lq035q1_resources[] = {
864 .start = IRQ_PPI_ERROR,
865 .end = IRQ_PPI_ERROR,
866 .flags = IORESOURCE_IRQ,
870 static struct platform_device bfin_lq035q1_device = {
871 .name = "bfin-lq035q1",
872 .id = -1,
873 .num_resources = ARRAY_SIZE(bfin_lq035q1_resources),
874 .resource = bfin_lq035q1_resources,
875 .dev = {
876 .platform_data = &bfin_lq035q1_data,
879 #endif
881 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
882 static struct resource bfin_uart_resources[] = {
883 #ifdef CONFIG_SERIAL_BFIN_UART0
885 .start = 0xFFC00400,
886 .end = 0xFFC004FF,
887 .flags = IORESOURCE_MEM,
889 #endif
890 #ifdef CONFIG_SERIAL_BFIN_UART1
892 .start = 0xFFC02000,
893 .end = 0xFFC020FF,
894 .flags = IORESOURCE_MEM,
896 #endif
899 static struct platform_device bfin_uart_device = {
900 .name = "bfin-uart",
901 .id = 1,
902 .num_resources = ARRAY_SIZE(bfin_uart_resources),
903 .resource = bfin_uart_resources,
905 #endif
907 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
908 #ifdef CONFIG_BFIN_SIR0
909 static struct resource bfin_sir0_resources[] = {
911 .start = 0xFFC00400,
912 .end = 0xFFC004FF,
913 .flags = IORESOURCE_MEM,
916 .start = IRQ_UART0_RX,
917 .end = IRQ_UART0_RX+1,
918 .flags = IORESOURCE_IRQ,
921 .start = CH_UART0_RX,
922 .end = CH_UART0_RX+1,
923 .flags = IORESOURCE_DMA,
927 static struct platform_device bfin_sir0_device = {
928 .name = "bfin_sir",
929 .id = 0,
930 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
931 .resource = bfin_sir0_resources,
933 #endif
934 #ifdef CONFIG_BFIN_SIR1
935 static struct resource bfin_sir1_resources[] = {
937 .start = 0xFFC02000,
938 .end = 0xFFC020FF,
939 .flags = IORESOURCE_MEM,
942 .start = IRQ_UART1_RX,
943 .end = IRQ_UART1_RX+1,
944 .flags = IORESOURCE_IRQ,
947 .start = CH_UART1_RX,
948 .end = CH_UART1_RX+1,
949 .flags = IORESOURCE_DMA,
953 static struct platform_device bfin_sir1_device = {
954 .name = "bfin_sir",
955 .id = 1,
956 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
957 .resource = bfin_sir1_resources,
959 #endif
960 #endif
962 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
963 static struct resource bfin_twi0_resource[] = {
964 [0] = {
965 .start = TWI0_REGBASE,
966 .end = TWI0_REGBASE,
967 .flags = IORESOURCE_MEM,
969 [1] = {
970 .start = IRQ_TWI,
971 .end = IRQ_TWI,
972 .flags = IORESOURCE_IRQ,
976 static struct platform_device i2c_bfin_twi_device = {
977 .name = "i2c-bfin-twi",
978 .id = 0,
979 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
980 .resource = bfin_twi0_resource,
982 #endif
984 #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
985 #include <linux/input.h>
986 #include <linux/i2c/adp5588_keys.h>
987 static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
988 [0] = KEY_GRAVE,
989 [1] = KEY_1,
990 [2] = KEY_2,
991 [3] = KEY_3,
992 [4] = KEY_4,
993 [5] = KEY_5,
994 [6] = KEY_6,
995 [7] = KEY_7,
996 [8] = KEY_8,
997 [9] = KEY_9,
998 [10] = KEY_0,
999 [11] = KEY_MINUS,
1000 [12] = KEY_EQUAL,
1001 [13] = KEY_BACKSLASH,
1002 [15] = KEY_KP0,
1003 [16] = KEY_Q,
1004 [17] = KEY_W,
1005 [18] = KEY_E,
1006 [19] = KEY_R,
1007 [20] = KEY_T,
1008 [21] = KEY_Y,
1009 [22] = KEY_U,
1010 [23] = KEY_I,
1011 [24] = KEY_O,
1012 [25] = KEY_P,
1013 [26] = KEY_LEFTBRACE,
1014 [27] = KEY_RIGHTBRACE,
1015 [29] = KEY_KP1,
1016 [30] = KEY_KP2,
1017 [31] = KEY_KP3,
1018 [32] = KEY_A,
1019 [33] = KEY_S,
1020 [34] = KEY_D,
1021 [35] = KEY_F,
1022 [36] = KEY_G,
1023 [37] = KEY_H,
1024 [38] = KEY_J,
1025 [39] = KEY_K,
1026 [40] = KEY_L,
1027 [41] = KEY_SEMICOLON,
1028 [42] = KEY_APOSTROPHE,
1029 [43] = KEY_BACKSLASH,
1030 [45] = KEY_KP4,
1031 [46] = KEY_KP5,
1032 [47] = KEY_KP6,
1033 [48] = KEY_102ND,
1034 [49] = KEY_Z,
1035 [50] = KEY_X,
1036 [51] = KEY_C,
1037 [52] = KEY_V,
1038 [53] = KEY_B,
1039 [54] = KEY_N,
1040 [55] = KEY_M,
1041 [56] = KEY_COMMA,
1042 [57] = KEY_DOT,
1043 [58] = KEY_SLASH,
1044 [60] = KEY_KPDOT,
1045 [61] = KEY_KP7,
1046 [62] = KEY_KP8,
1047 [63] = KEY_KP9,
1048 [64] = KEY_SPACE,
1049 [65] = KEY_BACKSPACE,
1050 [66] = KEY_TAB,
1051 [67] = KEY_KPENTER,
1052 [68] = KEY_ENTER,
1053 [69] = KEY_ESC,
1054 [70] = KEY_DELETE,
1055 [74] = KEY_KPMINUS,
1056 [76] = KEY_UP,
1057 [77] = KEY_DOWN,
1058 [78] = KEY_RIGHT,
1059 [79] = KEY_LEFT,
1062 static struct adp5588_kpad_platform_data adp5588_kpad_data = {
1063 .rows = 8,
1064 .cols = 10,
1065 .keymap = adp5588_keymap,
1066 .keymapsize = ARRAY_SIZE(adp5588_keymap),
1067 .repeat = 0,
1069 #endif
1071 #ifdef CONFIG_I2C_BOARDINFO
1072 static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1073 #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)
1075 I2C_BOARD_INFO("ad7142_joystick", 0x2C),
1076 .irq = IRQ_PF5,
1078 #endif
1079 #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
1081 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
1083 #endif
1084 #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
1086 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
1087 .irq = IRQ_PG6,
1089 #endif
1090 #if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE)
1092 I2C_BOARD_INFO("ad7879", 0x2F),
1093 .irq = IRQ_PG5,
1094 .platform_data = (void *)&bfin_ad7879_ts_info,
1096 #endif
1097 #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
1099 I2C_BOARD_INFO("adp5588-keys", 0x34),
1100 .irq = IRQ_PG0,
1101 .platform_data = (void *)&adp5588_kpad_data,
1103 #endif
1105 #endif
1107 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1108 static struct platform_device bfin_sport0_uart_device = {
1109 .name = "bfin-sport-uart",
1110 .id = 0,
1113 static struct platform_device bfin_sport1_uart_device = {
1114 .name = "bfin-sport-uart",
1115 .id = 1,
1117 #endif
1119 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1120 #define PATA_INT IRQ_PF5
1122 static struct pata_platform_info bfin_pata_platform_data = {
1123 .ioport_shift = 1,
1124 .irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
1127 static struct resource bfin_pata_resources[] = {
1129 .start = 0x20314020,
1130 .end = 0x2031403F,
1131 .flags = IORESOURCE_MEM,
1134 .start = 0x2031401C,
1135 .end = 0x2031401F,
1136 .flags = IORESOURCE_MEM,
1139 .start = PATA_INT,
1140 .end = PATA_INT,
1141 .flags = IORESOURCE_IRQ,
1145 static struct platform_device bfin_pata_device = {
1146 .name = "pata_platform",
1147 .id = -1,
1148 .num_resources = ARRAY_SIZE(bfin_pata_resources),
1149 .resource = bfin_pata_resources,
1150 .dev = {
1151 .platform_data = &bfin_pata_platform_data,
1154 #endif
1156 static const unsigned int cclk_vlev_datasheet[] =
1158 VRPAIR(VLEV_085, 250000000),
1159 VRPAIR(VLEV_090, 376000000),
1160 VRPAIR(VLEV_095, 426000000),
1161 VRPAIR(VLEV_100, 426000000),
1162 VRPAIR(VLEV_105, 476000000),
1163 VRPAIR(VLEV_110, 476000000),
1164 VRPAIR(VLEV_115, 476000000),
1165 VRPAIR(VLEV_120, 500000000),
1166 VRPAIR(VLEV_125, 533000000),
1167 VRPAIR(VLEV_130, 600000000),
1170 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
1171 .tuple_tab = cclk_vlev_datasheet,
1172 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
1173 .vr_settling_time = 25 /* us */,
1176 static struct platform_device bfin_dpmc = {
1177 .name = "bfin dpmc",
1178 .dev = {
1179 .platform_data = &bfin_dmpc_vreg_data,
1183 static struct platform_device *stamp_devices[] __initdata = {
1185 &bfin_dpmc,
1187 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
1188 &bfin_pcmcia_cf_device,
1189 #endif
1191 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
1192 &rtc_device,
1193 #endif
1195 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
1196 &sl811_hcd_device,
1197 #endif
1199 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
1200 &isp1362_hcd_device,
1201 #endif
1203 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
1204 &bfin_isp1760_device,
1205 #endif
1207 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
1208 &smc91x_device,
1209 #endif
1211 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
1212 &dm9000_device,
1213 #endif
1215 #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
1216 &ax88180_device,
1217 #endif
1219 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
1220 &bfin_mac_device,
1221 #endif
1223 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
1224 &net2272_bfin_device,
1225 #endif
1227 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1228 &bfin_spi0_device,
1229 #endif
1231 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
1232 &bfin_fb_device,
1233 #endif
1235 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
1236 &bfin_lq035q1_device,
1237 #endif
1239 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
1240 &bfin_fb_adv7393_device,
1241 #endif
1243 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1244 &bfin_uart_device,
1245 #endif
1247 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
1248 #ifdef CONFIG_BFIN_SIR0
1249 &bfin_sir0_device,
1250 #endif
1251 #ifdef CONFIG_BFIN_SIR1
1252 &bfin_sir1_device,
1253 #endif
1254 #endif
1256 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1257 &i2c_bfin_twi_device,
1258 #endif
1260 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1261 &bfin_sport0_uart_device,
1262 &bfin_sport1_uart_device,
1263 #endif
1265 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1266 &bfin_pata_device,
1267 #endif
1269 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1270 &bfin_device_gpiokeys,
1271 #endif
1273 &bfin_gpios_device,
1275 #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
1276 &bfin_async_nand_device,
1277 #endif
1279 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1280 &stamp_flash_device,
1281 #endif
1284 static int __init stamp_init(void)
1286 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1288 #ifdef CONFIG_I2C_BOARDINFO
1289 i2c_register_board_info(0, bfin_i2c_board_info,
1290 ARRAY_SIZE(bfin_i2c_board_info));
1291 #endif
1293 bfin_plat_nand_init();
1294 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
1295 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1297 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1298 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
1299 #endif
1301 return 0;
1304 arch_initcall(stamp_init);
1306 void native_machine_restart(char *cmd)
1308 /* workaround reboot hang when booting from SPI */
1309 if ((bfin_read_SYSCR() & 0x7) == 0x3)
1310 bfin_gpio_reset_spi0_ssel1();
1314 * Currently the MAC address is saved in Flash by U-Boot
1316 #define FLASH_MAC 0x203f0000
1317 void bfin_get_ether_addr(char *addr)
1319 *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC);
1320 *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4);
1322 EXPORT_SYMBOL(bfin_get_ether_addr);