diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-27 09:31:13 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-27 09:31:13 +0100 |
commit | 192d6fe9beb1b8e298806ddd2d81670e578efd7e (patch) | |
tree | 4c46ae60d19429ffdaf23267a1d1ca1f14afcf63 /arch/arm | |
parent | 268c531d62a3b7e6c13728feab007e866ed8be84 (diff) | |
parent | 79c2f03aeed7b232592495f6af5fd94fbd102d25 (diff) | |
download | barebox-192d6fe9beb1b8e298806ddd2d81670e578efd7e.tar.gz barebox-192d6fe9beb1b8e298806ddd2d81670e578efd7e.tar.xz |
Merge branch 'pu/debug' into next
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boards/at91sam9260ek/init.c | 3 | ||||
-rw-r--r-- | arch/arm/boards/dss11/init.c | 3 | ||||
-rw-r--r-- | arch/arm/cpu/interrupts.c | 5 | ||||
-rw-r--r-- | arch/arm/include/asm/barebox.h | 39 | ||||
-rw-r--r-- | arch/arm/lib/div0.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 65 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/board.h | 1 |
9 files changed, 72 insertions, 71 deletions
diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c index 4bff35e90f..03abc0e3fc 100644 --- a/arch/arm/boards/at91sam9260ek/init.c +++ b/arch/arm/boards/at91sam9260ek/init.c @@ -172,6 +172,7 @@ static void at91sam9260ek_phy_reset(void) #if defined(CONFIG_MCI_ATMEL) static struct atmel_mci_platform_data __initdata ek_mci_data = { .bus_width = 4, + .slot_b = 1, }; static void ek_usb_add_device_mci(void) @@ -179,7 +180,7 @@ static void ek_usb_add_device_mci(void) if (machine_is_at91sam9g20ek()) ek_mci_data.detect_pin = AT91_PIN_PC9; - at91_add_device_mci(1, &ek_mci_data); + at91_add_device_mci(0, &ek_mci_data); } #else static void ek_usb_add_device_mci(void) {} diff --git a/arch/arm/boards/dss11/init.c b/arch/arm/boards/dss11/init.c index 96c4eefa77..722c0f6b07 100644 --- a/arch/arm/boards/dss11/init.c +++ b/arch/arm/boards/dss11/init.c @@ -110,6 +110,7 @@ static void dss11_phy_reset(void) } static struct atmel_mci_platform_data dss11_mci_data = { + .slot_b = 1, .bus_width = 4, .host_caps = MMC_MODE_HS, }; @@ -131,7 +132,7 @@ static int dss11_devices_init(void) dss11_add_device_nand(); dss11_phy_reset(); at91_add_device_eth(&macb_pdata); - at91_add_device_mci(1, &dss11_mci_data); + at91_add_device_mci(0, &dss11_mci_data); at91_add_device_usbh_ohci(&dss11_usbh_data); armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100)); diff --git a/arch/arm/cpu/interrupts.c b/arch/arm/cpu/interrupts.c index 3d2077f491..c4f911392a 100644 --- a/arch/arm/cpu/interrupts.c +++ b/arch/arm/cpu/interrupts.c @@ -73,6 +73,11 @@ void show_regs (struct pt_regs *regs) #endif } +void dump_stack(void) +{ + unwind_backtrace(NULL); +} + static void __noreturn do_exception(struct pt_regs *pt_regs) { show_regs(pt_regs); diff --git a/arch/arm/include/asm/barebox.h b/arch/arm/include/asm/barebox.h index c9372dab93..2b08d68909 100644 --- a/arch/arm/include/asm/barebox.h +++ b/arch/arm/include/asm/barebox.h @@ -1,41 +1,8 @@ -/* - * (C) Copyright 2002 - * Sysgo Real-Time Solutions, GmbH <www.elinos.com> - * Marius Groeger <mgroeger@sysgo.de> - * - * (C) Copyright 2002 - * Sysgo Real-Time Solutions, GmbH <www.elinos.com> - * Alex Zuepke <azu@sysgo.de> - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * - ******************************************************************** - * NOTE: This header file defines an interface to barebox. Including - * this (unmodified) header file in another file is considered normal - * use of barebox, and does *not* fall under the heading of "derived - * work". - ******************************************************************** - */ - #ifndef _BAREBOX_H_ #define _BAREBOX_H_ 1 -//typedef struct bd_info {} bd_t; +#ifdef CONFIG_ARM_UNWIND +#define ARCH_HAS_STACK_DUMP +#endif #endif /* _BAREBOX_H_ */ diff --git a/arch/arm/lib/div0.c b/arch/arm/lib/div0.c index 99d6b85ea2..6313c6725d 100644 --- a/arch/arm/lib/div0.c +++ b/arch/arm/lib/div0.c @@ -27,5 +27,5 @@ extern void __div0(void); /* Replacement (=dummy) for GNU/Linux division-by zero handler */ void __div0 (void) { - hang(); + panic("division by zero\n"); } diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index c8871f86df..3ddd0cfd90 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@ -356,18 +356,7 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) at91_set_A_periph(AT91_PIN_PA8, 0); - if (mmc_id == 0) { - /* CMD */ - at91_set_A_periph(AT91_PIN_PA7, 1); - - /* DAT0, maybe DAT1..DAT3 */ - at91_set_A_periph(AT91_PIN_PA6, 1); - if (data->bus_width == 4) { - at91_set_A_periph(AT91_PIN_PA9, 1); - at91_set_A_periph(AT91_PIN_PA10, 1); - at91_set_A_periph(AT91_PIN_PA11, 1); - } - } else if (mmc_id == 1) { + if (data->slot_b) { /* CMD */ at91_set_B_periph(AT91_PIN_PA1, 1); @@ -378,6 +367,17 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) at91_set_B_periph(AT91_PIN_PA4, 1); at91_set_B_periph(AT91_PIN_PA5, 1); } + } else { + /* CMD */ + at91_set_A_periph(AT91_PIN_PA7, 1); + + /* DAT0, maybe DAT1..DAT3 */ + at91_set_A_periph(AT91_PIN_PA6, 1); + if (data->bus_width == 4) { + at91_set_A_periph(AT91_PIN_PA9, 1); + at91_set_A_periph(AT91_PIN_PA10, 1); + at91_set_A_periph(AT91_PIN_PA11, 1); + } } dev = add_generic_device("atmel_mci", mmc_id, NULL, AT91SAM9260_BASE_MCI, SZ_16K, diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 1811c12e16..fc7dc1432a 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c @@ -310,33 +310,58 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) if (mmc_id == 0) { /* MCI0 */ start = AT91SAM9263_BASE_MCI0; + /* CLK */ at91_set_A_periph(AT91_PIN_PA12, 0); - /* CMD */ - at91_set_A_periph(AT91_PIN_PA1, 1); - - /* DAT0, maybe DAT1..DAT3 and maybe DAT4..DAT7 */ - at91_set_A_periph(AT91_PIN_PA0, 1); - if (data->bus_width == 4) { - at91_set_A_periph(AT91_PIN_PA3, 1); - at91_set_A_periph(AT91_PIN_PA4, 1); - at91_set_A_periph(AT91_PIN_PA5, 1); + if (data->slot_b) { + /* CMD */ + at91_set_A_periph(AT91_PIN_PA16, 1); + + /* DAT0, maybe DAT1..DAT3 */ + at91_set_A_periph(AT91_PIN_PA17, 1); + if (data->bus_width == 4) { + at91_set_A_periph(AT91_PIN_PA18, 1); + at91_set_A_periph(AT91_PIN_PA19, 1); + at91_set_A_periph(AT91_PIN_PA20, 1); + } + } else { + /* CMD */ + at91_set_A_periph(AT91_PIN_PA1, 1); + + /* DAT0, maybe DAT1..DAT3 */ + at91_set_A_periph(AT91_PIN_PA0, 1); + if (data->bus_width == 4) { + at91_set_A_periph(AT91_PIN_PA3, 1); + at91_set_A_periph(AT91_PIN_PA4, 1); + at91_set_A_periph(AT91_PIN_PA5, 1); + } } } else { /* MCI1 */ start = AT91SAM9263_BASE_MCI1; - /* CLK */ - at91_set_A_periph(AT91_PIN_PA6, 0); - - /* CMD */ - at91_set_A_periph(AT91_PIN_PA7, 1); - /* DAT0, maybe DAT1..DAT3 */ - at91_set_A_periph(AT91_PIN_PA8, 1); - if (data->bus_width == 4) { - at91_set_A_periph(AT91_PIN_PA9, 1); - at91_set_A_periph(AT91_PIN_PA10, 1); - at91_set_A_periph(AT91_PIN_PA11, 1); + if (data->slot_b) { + /* CMD */ + at91_set_A_periph(AT91_PIN_PA21, 1); + + /* DAT0, maybe DAT1..DAT3 */ + at91_set_A_periph(AT91_PIN_PA22, 1); + if (data->bus_width == 4) { + at91_set_A_periph(AT91_PIN_PA23, 1); + at91_set_A_periph(AT91_PIN_PA24, 1); + at91_set_A_periph(AT91_PIN_PA25, 1); + } + } else { + /* CMD */ + at91_set_A_periph(AT91_PIN_PA7, 1); + + /* DAT0, maybe DAT1..DAT3 */ + at91_set_A_periph(AT91_PIN_PA8, 1); + if (data->bus_width == 4) { + at91_set_A_periph(AT91_PIN_PA9, 1); + at91_set_A_periph(AT91_PIN_PA10, 1); + at91_set_A_periph(AT91_PIN_PA11, 1); + } } } diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 9a24022f3a..bb252bdd47 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c @@ -264,6 +264,7 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) } } } else { /* MCI1 */ + data->slot_b = 1; start = AT91SAM9G45_BASE_MCI1; /* CLK */ at91_set_A_periph(AT91_PIN_PA31, 0); diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index 738af87370..755ddc8861 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h @@ -87,6 +87,7 @@ void at91_register_uart(unsigned id, unsigned pins); /* Multimedia Card Interface */ struct atmel_mci_platform_data { + unsigned slot_b; unsigned bus_width; unsigned host_caps; /* MCI_MODE_* from mci.h */ unsigned detect_pin; |