Спроектировали девайс на at91sam9260, аналог платы starterkit (которая под sim508), но с набортным GPS и GSM. На девайсе предполагается иметь линукс. 64 метра памяти двумя микросхемами (как на starterkit).
Если включить i-cache и d-cache в ядре, то получаем сбои доступа к памяти в разные моменты времени. Примеры:
CODE
AND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
Scanning device for bad blocks
Unable to handle kernel paging request at virtual address 33cc3778
pgd = c0004000
[33cc3778] *pgd=00000000
Internal error: Oops: 5 [#1]
last sysfs file:
Modules linked in:
CPU: 0 Not tainted (2.6.38+ #7)
PC is at atmel_nand_device_ready+0xc/0x2c
LR is at nand_wait_ready+0x84/0xac
pc : [<c0163c38>] lr : [<c015fb10>] psr: a0000013
sp : c381bdb0 ip : 00000010 fp : 00000000
r10: 00000010 r9 : 00000340 r8 : 00000340
r7 : ffff8b1c r6 : c389a400 r5 : c0306bf0 r4 : 33cc33cc
r3 : c381a400 r2 : 00000000 r1 : 0000000d r0 : c389a628
Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 20004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc381a270)
Stack: (0xc381bdb0 to 0xc381c000)
bda0: c389a628 c015fb10 c389a400 c389a628
bdc0: c381be48 00000010 00000340 c0160140 fffffffc c0321518 00000000 00000009
bde0: 00000000 00000000 00000010 c38e0490 0000001f 00000010 00000000 c389a628
be00: 00000000 c38b0540 c389a400 c38e0480 00000002 00000034 00000000 c0162b98
be20: c381be48 00000041 00068000 00000000 00068000 00000000 00001fff 00000001
be40: 00000000 00001000 00000000 000200d0 00000000 00000010 00000010 00000000
be60: 00000000 c38e0480 00000000 c389a628 00000000 00000000 c389a400 00000000
be80: 00000000 00000000 00000000 c0162f94 c02c0f06 c3802360 000000d0 c3802368
bea0: c02c0f06 c389a400 40000013 c38b0540 000000d0 c0086794 c389a400 c389a400
bec0: c389a628 00000000 c03051b0 00000000 00000000 00000000 00000000 c015eb0c
bee0: c389a400 c389a628 c03051b8 c0016344 00000000 00000000 c381bee0 c03051b8
bf00: c03051b8 c0315070 c0315070 c0140c60 c03051b8 c013fdc4 c03051b8 c03051ec
bf20: c0315070 00000000 00000000 c013fedc c0315070 c381bf40 c013fe7c c013f65c
bf40: c382dbf8 c3861ed0 c0315070 c0315070 c38b05a0 c03117b8 00000000 c013efa8
bf60: c02ad003 c02ad003 00000073 c0315070 c0016058 c00248cc 00000000 00000000
bf80: 00000000 c01401ac c031505c c0016058 c00248cc 00000000 00000000 c0140ec0
bfa0: c001e6ec c0016058 c00248cc c00233d0 c0022010 00373231 00000000 c0020000
bfc0: 00000013 000000bf c030b788 c001e6ec c001e7e4 c00248cc 00000013 00000000
bfe0: 00000000 c00083c8 00000000 c0008330 c00248cc c00248cc 33cc33cc 33cc33cc
[<c0163c38>] (atmel_nand_device_ready+0xc/0x2c) from [<c015fb10>] (nand_wait_ready+0x84/0xac)
[<c015fb10>] (nand_wait_ready+0x84/0xac) from [<c0160140>] (nand_read_oob+0x218/0x2bc)
[<c0160140>] (nand_read_oob+0x218/0x2bc) from [<c0162b98>] (create_bbt+0x21c/0x374)
[<c0162b98>] (create_bbt+0x21c/0x374) from [<c0162f94>] (nand_scan_bbt+0x80/0x4c8)
[<c0162f94>] (nand_scan_bbt+0x80/0x4c8) from [<c015eb0c>] (nand_scan_tail+0x4c8/0x570)
[<c015eb0c>] (nand_scan_tail+0x4c8/0x570) from [<c0016344>] (atmel_nand_probe+0x2d8/0x418)
[<c0016344>] (atmel_nand_probe+0x2d8/0x418) from [<c0140c60>] (platform_drv_probe+0x14/0x18)
[<c0140c60>] (platform_drv_probe+0x14/0x18) from [<c013fdc4>] (driver_probe_device+0xb0/0x168)
[<c013fdc4>] (driver_probe_device+0xb0/0x168) from [<c013fedc>] (__driver_attach+0x60/0x84)
[<c013fedc>] (__driver_attach+0x60/0x84) from [<c013f65c>] (bus_for_each_dev+0x48/0x84)
[<c013f65c>] (bus_for_each_dev+0x48/0x84) from [<c013efa8>] (bus_add_driver+0x9c/0x214)
[<c013efa8>] (bus_add_driver+0x9c/0x214) from [<c01401ac>] (driver_register+0xac/0x138)
[<c01401ac>] (driver_register+0xac/0x138) from [<c0140ec0>] (platform_driver_probe+0x18/0x68)
[<c0140ec0>] (platform_driver_probe+0x18/0x68) from [<c00233d0>] (do_one_initcall+0xd4/0x1b0)
[<c00233d0>] (do_one_initcall+0xd4/0x1b0) from [<c00083c8>] (kernel_init+0x98/0x148)
[<c00083c8>] (kernel_init+0x98/0x148) from [<c00248cc>] (kernel_thread_exit+0x0/0x8)
Code: e12fff1e e92d4010 e59030cc e5934224 (e59433ac)
---[ end trace 045a7e835845dba7 ]---
Kernel panic - not syncing: Attempted to kill init!
CODE
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource pit
Unable to handle kernel paging request at virtual address 33cc33d0
pgd = c0004000
[33cc33d0] *pgd=00000000
Internal error: Oops: 805 [#1]
last sysfs file:
Modules linked in:
CPU: 0 Not tainted (2.6.38+ #7)
PC is at cache_alloc_refill+0x1a8/0x50c
LR is at zone_watermark_ok+0x18/0x1c
pc : [<c0086948>] lr : [<c0069604>] psr: 60000093
sp : c381bed0 ip : 0000001e fp : 00000010
r10: 000000d0 r9 : 00000001 r8 : c3802170
r7 : 0000001f r6 : c3803a00 r5 : c2002160 r4 : c38001e0
r3 : c388c000 r2 : 0000001e r1 : 33cc33cc r0 : 00100100
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 20004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc381a270)
Stack: (0xc381bed0 to 0xc381c000)
bec0: 0000003e c3802160 000000d0 c3802168
bee0: c3881520 00000000 60000013 c38001e0 000000d0 000000f0 00000001 00000009
bf00: 000000f0 c008675c 00000000 c38813a0 00002261 c384db60 000000f0 c012f5a4
bf20: c3807e00 00000000 c38813a0 000000f0 00000000 00000001 c030ed60 c012fa08
bf40: c3807e00 c030ea24 c032ca04 00000001 00000000 c032ca0c 00000000 00000000
bf60: 00000000 00000000 00000000 c00143cc 00000000 c032ca04 c00248cc c001462c
bf80: c02bc9df c3876278 00000000 c032c530 00000000 c0013d50 c02aab05 c010e468
bfa0: 20000013 c001e57c c0014bec c00233d0 c0022010 00373231 00000000 c0020000
bfc0: 00000013 000000bf c030b788 c001e57c c001e7e4 c00248cc 00000013 00000000
bfe0: 00000000 c00083c8 00000000 c0008330 c00248cc c00248cc 33cc33cc 33cc33cc
[<c0086948>] (cache_alloc_refill+0x1a8/0x50c) from [<c008675c>] (kmem_cache_alloc+0x54/0x98)
[<c008675c>] (kmem_cache_alloc+0x54/0x98) from [<c012f5a4>] (con_insert_unipair+0x7c/0xc8)
[<c012f5a4>] (con_insert_unipair+0x7c/0xc8) from [<c012fa08>] (con_set_default_unimap+0xac/0x150)
[<c012fa08>] (con_set_default_unimap+0xac/0x150) from [<c00143cc>] (console_map_init+0x3c/0x50)
[<c00143cc>] (console_map_init+0x3c/0x50) from [<c001462c>] (vty_init+0x174/0x1b8)
[<c001462c>] (vty_init+0x174/0x1b8) from [<c0013d50>] (tty_init+0xfc/0x138)
[<c0013d50>] (tty_init+0xfc/0x138) from [<c00233d0>] (do_one_initcall+0xd4/0x1b0)
[<c00233d0>] (do_one_initcall+0xd4/0x1b0) from [<c00083c8>] (kernel_init+0x98/0x148)
[<c00083c8>] (kernel_init+0x98/0x148) from [<c00248cc>] (kernel_thread_exit+0x0/0x8)
Code: e59f1354 e8830003 1a000006 e5951008 (e5813004)
---[ end trace 1b75b31a2719ed1c ]---
Kernel panic - not syncing: Attempted to kill init!
CODE
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.38+ (yury@debian-dev-vm) (gcc version 4.4.5 (indigo-ct-ng) ) #7 Thu Apr 7 16:38:13 MSD 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Indigo Tracker Prototype
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 196 MHz, master 98 MHz, main 12.000 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/mmcblk0p1 rootwait rw console=ttyS0,115200 mem=64M
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61656k/61656k available, 3880k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc4800000 - 0xfee00000 ( 934 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc0023000 ( 108 kB)
.text : 0xc0023000 - 0xc02fc848 (2919 kB)
.data : 0xc02fe000 - 0xc0321720 ( 142 kB)
NR_IRQS:192
AT91: 96 gpio irqs in 3 banks
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating delay loop... 97.89 BogoMIPS (lpj=489472)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource pit
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
msgmni has been set to 120
io scheduler noop registered (default)
io scheduler deadline registered
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
brd: module loaded
Unable to handle kernel NULL pointer dereference at virtual address 00000004
pgd = c0004000
[00000004] *pgd=00000000
Internal error: Oops: 805 [#1]
last sysfs file:
Modules linked in:
CPU: 0 Not tainted (2.6.38+ #7)
PC is at cache_alloc_refill+0x1c4/0x50c
LR is at get_page_from_freelist+0x12c/0x480
pc : [<c0086964>] lr : [<c006b6f8>] psr: 00000093
sp : c381be88 ip : 00000025 fp : 00000010
r10: 000000d0 r9 : 00000001 r8 : c3802ef0
r7 : 00000026 r6 : c380b600 r5 : c2802ae0 r4 : c3800f00
r3 : c38ce000 r2 : 00000001 r1 : 00000000 r0 : 00100100
Flags: nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 20004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc381a270)
Stack: (0xc381be88 to 0xc381c000)
be80: 000007c0 c3802ee0 000080d0 c3802ee8 00000000 c030d974
bea0: 60000013 c3800f00 000080d0 00008124 00000000 00000000 00000000 c008675c
bec0: c030d974 00000000 00000002 c02bb380 00008124 c00cb600 c02bb380 00008124
bee0: 00000002 c030d974 c38cde78 c38c1a58 0000002c c030d868 00000000 c00cad94
bf00: c38cde78 c030d974 00000002 00000000 c38b4ed8 c38c1a58 0000002c c010e69c
bf20: c38b4ed8 c38b4d60 c38c1a58 c0311a40 c0311a9c c010e8f0 c38b4ed8 c381bf4c
bf40: c02ab2ee c0103df8 c02ab2ee c02ccc5c c38c1a00 c38b4d60 00000000 c0311a40
bf60: c0311a9c c0108b94 c0107d20 c38c1a00 00000007 00700006 00000008 c38c1c00
bf80: 00100000 c0311a9c c0311a40 c001579c c00156d8 c381bfb0 c001e6c4 c00156d8
bfa0: c00248cc 00000000 00000000 c00233d0 c0022010 00373231 00000000 c0020000
bfc0: 00000013 000000bf c030b788 c001e6c4 c001e7e4 c00248cc 00000013 00000000
bfe0: 00000000 c00083c8 00000000 c0008330 c00248cc c00248cc 33cc33cc 33cc33cc
[<c0086964>] (cache_alloc_refill+0x1c4/0x50c) from [<c008675c>] (kmem_cache_alloc+0x54/0x98)
[<c008675c>] (kmem_cache_alloc+0x54/0x98) from [<c00cb600>] (sysfs_new_dirent+0x40/0xd8)
[<c00cb600>] (sysfs_new_dirent+0x40/0xd8) from [<c00cad94>] (sysfs_add_file_mode+0x1c/0x90)
[<c00cad94>] (sysfs_add_file_mode+0x1c/0x90) from [<c010e69c>] (kobject_add_internal+0xe4/0x1bc)
[<c010e69c>] (kobject_add_internal+0xe4/0x1bc) from [<c010e8f0>] (kobject_add+0x4c/0x5c)
[<c010e8f0>] (kobject_add+0x4c/0x5c) from [<c0103df8>] (blk_register_queue+0x48/0xac)
[<c0103df8>] (blk_register_queue+0x48/0xac) from [<c0108b94>] (add_disk+0xe8/0x240)
[<c0108b94>] (add_disk+0xe8/0x240) from [<c001579c>] (loop_init+0xc4/0x174)
[<c001579c>] (loop_init+0xc4/0x174) from [<c00233d0>] (do_one_initcall+0xd4/0x1b0)
[<c00233d0>] (do_one_initcall+0xd4/0x1b0) from [<c00083c8>] (kernel_init+0x98/0x148)
[<c00083c8>] (kernel_init+0x98/0x148) from [<c00248cc>] (kernel_thread_exit+0x0/0x8)
Code: e5830004 e5853008 ea000003 e5951000 (e5813004)
---[ end trace 47abd0227e31a48d ]---
Kernel panic - not syncing: Attempted to kill init!
Если в ядре выключить кеши (опции CONFIG_CPU_ICACHE_DISABLE и CONFIG_CPU_DCACHE_DISABLE), то всё работает стабильно и предсказуемо, только заметно медленнее, что логично.
Версия ядра -- 2.6.38 + yaffs2 + патч под наш board. На отладочной плате starterkit такое же самое ядро прекрасно работает со включенными кешами, поэтому очень сильные подозрения на какие-то аппаратные недоработки, но опыта дебага хардварных проблем программными средствами у меня нет. Очень нужен совет по поводу того, в каком направлении нужно копать, чтобы локализовать проблему.
Файл борды:
CODE
/*
* linux/arch/arm/mach-at91/board-sam9260ek.c
*/
#include <linux/types.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/spi/at73c213.h>
// yury
#include <linux/spi/tlv320aic23b.h>
#include <linux/clk.h>
#include <linux/i2c/at24.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/board.h>
#include <mach/gpio.h>
#include <mach/at91sam9_smc.h>
#include <mach/at91_shdwc.h>
#include "sam9_smc.h"
#include "generic.h"
static void __init ek_map_io(void)
{
/* Initialize processor: 18.432 MHz crystal */
/* yury */
at91sam9260_initialize(12000000);
/* DBGU on ttyS0. (Rx & Tx only) */
at91_register_uart(0, 0, 0);
// sim508/gsm
at91_register_uart(AT91SAM9260_ID_US0, 1, 0);
// sim508/gps ttyS2 is now GPS
at91_register_uart(AT91SAM9260_ID_US1, 2, 0);
/* set serial console to ttyS0 (ie, DBGU) */
at91_set_serial_console(0);
}
static void __init ek_init_irq(void)
{
at91sam9260_init_interrupts(NULL);
}
/*
* USB Host port
*/
static struct at91_usbh_data __initdata ek_usbh_data = {
.ports = 2,
};
/*
* USB Device port
*/
static struct at91_udc_data __initdata ek_udc_data = {
/* yury */
.vbus_pin = AT91_PIN_PC8,
.pullup_pin = 0, /* pull-up driven by UDC */
};
/*
* Audio
*/
static struct tlv320aic23b_board_info tlv320aic23b_data = {
.ssc_id = 0,
.shortname = "AT91SAM9260-EK external DAC",
};
static void __init tlv320aic23b_set_clk(struct tlv320aic23b_board_info *info)
{
struct clk *pck0;
struct clk *plla;
pck0 = clk_get(NULL, "pck0");
plla = clk_get(NULL, "pllb");
/* MCK Clock */
at91_set_B_periph(AT91_PIN_PC1, 0); /* PCK0 */
clk_set_parent(pck0, plla);
clk_set_rate(pck0, 12000000);
clk_put(plla);
info->dac_clk = pck0;
}
/*
* SPI devices.
*/
static struct spi_board_info ek_spi_devices[] = {
#if !defined(CONFIG_MMC_AT91)
{ /* DataFlash chip */
.modalias = "mtd_dataflash",
.chip_select = 1,
.max_speed_hz = 15 * 1000 * 1000,
.bus_num = 0,
},
#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
{ /* DataFlash card */
.modalias = "mtd_dataflash",
.chip_select = 0,
.max_speed_hz = 15 * 1000 * 1000,
.bus_num = 0,
},
#endif
#endif
#if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE)
{ /* AT73C213 DAC */
.modalias = "at73c213",
.chip_select = 0,
.max_speed_hz = 10 * 1000 * 1000,
.bus_num = 1,
.mode = SPI_MODE_1,
.platform_data = &at73c213_data,
},
#endif
{ /* tlv320aicb */
.modalias = "tlv320aic23b",
.chip_select = 0,
.max_speed_hz = 10 * 1000 * 1000,
.bus_num = 1,
.mode = SPI_MODE_1,
.platform_data = &tlv320aic23b_data,
},
};
/*
* MACB Ethernet device
*/
static struct at91_eth_data __initdata ek_macb_data = {
.phy_irq_pin = AT91_PIN_PA5,
.is_rmii = 1,
};
/*
* NAND flash
*/
static struct mtd_partition __initdata ek_nand_partition[] = {
{
// remember that bootstrap file should have CRC somewhere at the beggining
// see "Send Boot File" command in SAM-BA
.name = "Bootstrap partition",
.offset = 0x0,
.size = 0x10000,
},
{
.name = "U-boot Partition",
.offset = 0x20000,
.size = 0x30000
},
{
.name = "Kernel Partition",
.offset = 0x60000,
.size = 0x200000,
},
{
.name = "Storage Partition",
.offset = 0x800000,
.size = MTDPART_SIZ_FULL,
},
};
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
{
*num_partitions = ARRAY_SIZE(ek_nand_partition);
return ek_nand_partition;
}
static struct atmel_nand_data __initdata ek_nand_data = {
.ale = 21,
.cle = 22,
// .det_pin = ... not connected
.rdy_pin = AT91_PIN_PC13,
.enable_pin = AT91_PIN_PC14,
.partition_info = nand_partitions,
#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
.bus_width_16 = 1,
#else
.bus_width_16 = 0,
#endif
};
#if 0
static struct sam9_smc_config __initdata ek_nand_smc_config = {
.ncs_read_setup = 0,
.nrd_setup = 1,
.ncs_write_setup = 0,
.nwe_setup = 1,
.ncs_read_pulse = 3,
.nrd_pulse = 3,
.ncs_write_pulse = 3,
.nwe_pulse = 3,
.read_cycle = 5,
.write_cycle = 5,
.mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
.tdf_cycles = 2,
};
#endif
#if 1
static struct sam9_smc_config __initdata ek_nand_smc_config = {
.ncs_read_setup = 2,
.nrd_setup = 2,
.ncs_write_setup = 0,
.nwe_setup = 2,
.ncs_read_pulse = 3,
.nrd_pulse = 3,
.ncs_write_pulse = 3,
.nwe_pulse = 3,
.read_cycle = 5,
.write_cycle = 5,
.mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
.tdf_cycles = 2,
};
#endif
static void __init ek_add_device_nand(void)
{
/* setup bus-width (8 or 16) */
if (ek_nand_data.bus_width_16)
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
else
ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
/* configure chip-select 3 (NAND) */
sam9_smc_configure(3, &ek_nand_smc_config);
at91_add_device_nand(&ek_nand_data);
}
/*
* MCI (SD/MMC)
*/
static struct at91_mmc_data __initdata ek_mmc_data = {
/* yury */
.slot_b = 0,
.wire4 = 1,
.det_pin = AT91_PIN_PA4
// .det_pin = ... not connected
// .wp_pin = ... not connected
// .vcc_pin = ... not connected
};
/*
* LEDs
*/
#if 0
static struct gpio_led ek_leds[] = {
{ /* "bottom" led, green, userled1 to be defined */
.name = "ds5",
.gpio = AT91_PIN_PA6,
.active_low = 1,
.default_trigger = "none",
},
{ /* "power" led, yellow */
.name = "ds1",
.gpio = AT91_PIN_PA9,
.default_trigger = "heartbeat",
}
};
#endif
/*
* I2C devices
*/
static struct at24_platform_data at24c512 = {
.byte_len = SZ_512K / 8,
.page_size = 128,
.flags = AT24_FLAG_ADDR16,
};
static struct i2c_board_info __initdata ek_i2c_devices[] = {
{
I2C_BOARD_INFO("24c512", 0x50),
.platform_data = &at24c512,
},
/* more devices can be added using expansion connectors */
};
static void __init ek_board_init(void)
{
/* Serial */
at91_add_device_serial();
/* USB Host */
at91_add_device_usbh(&ek_usbh_data);
/* USB Device */
at91_add_device_udc(&ek_udc_data);
/* SPI */
at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
/* NAND */
ek_add_device_nand();
/* MMC */
at91_add_device_mmc(0, &ek_mmc_data);
/* I2C */
at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
/* SSC (to AT73C213) */
//at73c213_set_clk(&at73c213_data);
// yury
at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
tlv320aic23b_set_clk(&tlv320aic23b_data);
/* LEDs */
//at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
// ?
at91_sys_write(AT91_SHDW_MR, AT91_SHDW_CPTWK0_(10) | AT91_SHDW_WKMODE0_LOW
| AT91_SHDW_RTTWKEN);
}
MACHINE_START(AT91SAM9260EK, "Indigo Tracker Prototype")
/* Maintainer: Indigo, Ltd. */
.boot_params = AT91_SDRAM_BASE + 0x100,
.timer = &at91sam926x_timer,
.map_io = ek_map_io,
.init_irq = ek_init_irq,
.init_machine = ek_board_init,
MACHINE_END
Есть идеи? На этом форуме встречал предложения в случаях непонятного поведения процессора выключать кеши, но лично мне хотелось бы всё же работать со включенными кешами.