summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-05-06 09:30:28 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-06 09:30:28 +0200
commitc8af035b4176af0e8da2cdd2d10109b56e06444e (patch)
tree5e1e6feff42470e7c167c89ee07b7e8b1c37f81b /arch
parent3cdd18632e72cbb8b0402df3e4821dfd7d24643b (diff)
parent9e809ef4317cf96a477342a09b8c205a49e44554 (diff)
downloadbarebox-c8af035b4176af0e8da2cdd2d10109b56e06444e.tar.gz
barebox-c8af035b4176af0e8da2cdd2d10109b56e06444e.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'arch')
l---------arch/arm/boards/highbank/env/boot.d/010-ahci-boot1
l---------arch/arm/boards/highbank/env/boot.d/011-ahci1
l---------arch/arm/boards/highbank/env/boot.d/020-mmc-boot1
l---------arch/arm/boards/highbank/env/boot.d/021-mmc1
l---------arch/arm/boards/highbank/env/boot.d/030-net1
l---------arch/arm/boards/highbank/env/boot.d/031-net-eth11
-rw-r--r--arch/arm/boards/highbank/env/boot/ahci21
-rw-r--r--arch/arm/boards/highbank/env/boot/ahci-boot21
-rw-r--r--arch/arm/boards/highbank/env/boot/mmc21
-rw-r--r--arch/arm/boards/highbank/env/boot/mmc-boot21
-rw-r--r--arch/arm/boards/highbank/env/boot/net18
-rw-r--r--arch/arm/boards/highbank/env/boot/net-eth118
-rw-r--r--arch/arm/boards/highbank/env/config33
-rw-r--r--arch/arm/boards/highbank/env/config-board11
-rw-r--r--arch/arm/boards/highbank/env/data/oftree4
-rw-r--r--arch/arm/boards/highbank/env/init/001-dtb-probe (renamed from arch/arm/boards/highbank/env/bin/init_board)0
-rw-r--r--arch/arm/boards/highbank/env/init/automount27
-rw-r--r--arch/arm/boards/highbank/env/init/ps19
-rw-r--r--arch/arm/configs/phycard_a_l1_defconfig1
-rw-r--r--arch/arm/cpu/mmu.c7
-rw-r--r--arch/arm/mach-at91/gpio.c5
-rw-r--r--arch/arm/mach-at91/sam9_smc.c8
-rw-r--r--arch/arm/mach-highbank/Kconfig1
-rw-r--r--arch/arm/mach-imx/Kconfig6
-rw-r--r--arch/arm/mach-netx/Kconfig16
-rw-r--r--arch/arm/mach-omap/Kconfig2
-rw-r--r--arch/arm/mach-omap/omap3_clock.c6
27 files changed, 192 insertions, 70 deletions
diff --git a/arch/arm/boards/highbank/env/boot.d/010-ahci-boot b/arch/arm/boards/highbank/env/boot.d/010-ahci-boot
new file mode 120000
index 0000000000..3672f0495e
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot.d/010-ahci-boot
@@ -0,0 +1 @@
+../boot/ahci-boot \ No newline at end of file
diff --git a/arch/arm/boards/highbank/env/boot.d/011-ahci b/arch/arm/boards/highbank/env/boot.d/011-ahci
new file mode 120000
index 0000000000..36b3b2815b
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot.d/011-ahci
@@ -0,0 +1 @@
+../boot/ahci \ No newline at end of file
diff --git a/arch/arm/boards/highbank/env/boot.d/020-mmc-boot b/arch/arm/boards/highbank/env/boot.d/020-mmc-boot
new file mode 120000
index 0000000000..85c19bbd66
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot.d/020-mmc-boot
@@ -0,0 +1 @@
+../boot/mmc-boot \ No newline at end of file
diff --git a/arch/arm/boards/highbank/env/boot.d/021-mmc b/arch/arm/boards/highbank/env/boot.d/021-mmc
new file mode 120000
index 0000000000..5af95d0ac7
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot.d/021-mmc
@@ -0,0 +1 @@
+../boot/mmc \ No newline at end of file
diff --git a/arch/arm/boards/highbank/env/boot.d/030-net b/arch/arm/boards/highbank/env/boot.d/030-net
new file mode 120000
index 0000000000..70b8ea3965
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot.d/030-net
@@ -0,0 +1 @@
+../boot/net \ No newline at end of file
diff --git a/arch/arm/boards/highbank/env/boot.d/031-net-eth1 b/arch/arm/boards/highbank/env/boot.d/031-net-eth1
new file mode 120000
index 0000000000..5a30a308c7
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot.d/031-net-eth1
@@ -0,0 +1 @@
+../boot/net-eth1 \ No newline at end of file
diff --git a/arch/arm/boards/highbank/env/boot/ahci b/arch/arm/boards/highbank/env/boot/ahci
new file mode 100644
index 0000000000..3bdb809932
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot/ahci
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+ boot-menu-add-entry "$0" "AHCI"
+ exit
+fi
+
+path="/mnt/ahci"
+
+global.bootm.image="${path}/zImage"
+
+. /env/data/oftree
+
+oftree=${path}/oftree
+if [ -f $oftree ]; then
+ global.bootm.oftree="$oftree"
+fi
+
+# The rootdevice may actually be mmcblk1p2 if a card
+# is inserted to the back MMC slot
+global.linux.bootargs.dyn.root="root=/dev/sda2"
diff --git a/arch/arm/boards/highbank/env/boot/ahci-boot b/arch/arm/boards/highbank/env/boot/ahci-boot
new file mode 100644
index 0000000000..0064a46fcc
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot/ahci-boot
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+ boot-menu-add-entry "$0" "AHCI (UEFI boot partiton)"
+ exit
+fi
+
+path="/mnt/ahci-boot"
+
+global.bootm.image="${path}/zImage"
+
+. /env/data/oftree
+
+oftree=${path}/oftree
+if [ -f $oftree ]; then
+ global.bootm.oftree="$oftree"
+fi
+
+# The rootdevice may actually be mmcblk1p2 if a card
+# is inserted to the back MMC slot
+global.linux.bootargs.dyn.root="root=/dev/sda2"
diff --git a/arch/arm/boards/highbank/env/boot/mmc b/arch/arm/boards/highbank/env/boot/mmc
new file mode 100644
index 0000000000..43a04b5d6b
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot/mmc
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+ boot-menu-add-entry "$0" "MMC slot"
+ exit
+fi
+
+path="/mnt/mmc"
+
+global.bootm.image="${path}/zimage"
+
+. /env/data/oftree
+
+oftree=${path}/oftree
+if [ -f $oftree ]; then
+ global.bootm.oftree="$oftree"
+fi
+
+# The rootdevice may actually be mmcblk1p2 if a card
+# is inserted to the back MMC slot
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2"
diff --git a/arch/arm/boards/highbank/env/boot/mmc-boot b/arch/arm/boards/highbank/env/boot/mmc-boot
new file mode 100644
index 0000000000..93cd99b684
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot/mmc-boot
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+ boot-menu-add-entry "$0" "MMC slot (UEFI boot partiton)"
+ exit
+fi
+
+path="/mnt/mmc-boot"
+
+global.bootm.image="${path}/zimage"
+
+. /env/data/oftree
+
+oftree=${path}/oftree
+if [ -f $oftree ]; then
+ global.bootm.oftree="$oftree"
+fi
+
+# The rootdevice may actually be mmcblk1p2 if a card
+# is inserted to the back MMC slot
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2"
diff --git a/arch/arm/boards/highbank/env/boot/net b/arch/arm/boards/highbank/env/boot/net
new file mode 100644
index 0000000000..80862cdac1
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot/net
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+ boot-menu-add-entry "$0" "network (tftp, nfs) (eth0)"
+ exit
+fi
+
+ethact eth0
+
+path="/mnt/tftp"
+
+. /env/data/oftree
+
+global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
+#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
+nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
+bootargs-ip
+global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
diff --git a/arch/arm/boards/highbank/env/boot/net-eth1 b/arch/arm/boards/highbank/env/boot/net-eth1
new file mode 100644
index 0000000000..d9e9804a02
--- /dev/null
+++ b/arch/arm/boards/highbank/env/boot/net-eth1
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+ boot-menu-add-entry "$0" "network (tftp, nfs) (eth1)"
+ exit
+fi
+
+ethact eth1
+
+path="/mnt/tftp"
+
+. /env/data/oftree
+
+global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
+#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
+nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
+bootargs-ip
+global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
diff --git a/arch/arm/boards/highbank/env/config b/arch/arm/boards/highbank/env/config
deleted file mode 100644
index 1bb2c493b2..0000000000
--- a/arch/arm/boards/highbank/env/config
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# use 'dhcp' to do dhcp in barebox and in kernel
-# use 'none' if you want to skip kernel ip autoconfiguration
-ip=dhcp
-global.dhcp.vendor_id=barebox-highbank
-
-# or set your networking parameters here
-#eth0.ipaddr=a.b.c.d
-#eth0.netmask=a.b.c.d
-#eth0.gateway=a.b.c.d
-#eth0.serverip=a.b.c.d
-
-# can be either 'nfs', 'tftp' or 'nor'
-kernel_loc=tftp
-# can be either 'net', 'nor' or 'initrd'
-rootfs_loc=initrd
-
-# can be either 'jffs2' or 'ubifs'
-rootfs_type=ubifs
-rootfsimage=root.$rootfs_type
-
-kernelimage=zImage
-#kernelimage=uImage
-#kernelimage=Image
-#kernelimage=Image.lzo
-
-autoboot_timeout=3
-
-bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
-
-# set a fancy prompt (if support is compiled in)
-PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# "
diff --git a/arch/arm/boards/highbank/env/config-board b/arch/arm/boards/highbank/env/config-board
new file mode 100644
index 0000000000..a64d9e3245
--- /dev/null
+++ b/arch/arm/boards/highbank/env/config-board
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.hostname=highbank
+global.allow_color=true
+global.autoboot_timeout=3
+global.bootm.oftree="/dev/dtb"
+global.linux.bootargs.base="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
+global.boot.default=/env/boot.d
diff --git a/arch/arm/boards/highbank/env/data/oftree b/arch/arm/boards/highbank/env/data/oftree
new file mode 100644
index 0000000000..9a94b310c3
--- /dev/null
+++ b/arch/arm/boards/highbank/env/data/oftree
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+#device tree provided by the firmware
+global.bootm.oftree="/dev/dtb"
diff --git a/arch/arm/boards/highbank/env/bin/init_board b/arch/arm/boards/highbank/env/init/001-dtb-probe
index 610db1500e..610db1500e 100644
--- a/arch/arm/boards/highbank/env/bin/init_board
+++ b/arch/arm/boards/highbank/env/init/001-dtb-probe
diff --git a/arch/arm/boards/highbank/env/init/automount b/arch/arm/boards/highbank/env/init/automount
new file mode 100644
index 0000000000..2c283c6eed
--- /dev/null
+++ b/arch/arm/boards/highbank/env/init/automount
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+ init-menu-add-entry "$0" "Automountpoints"
+ exit
+fi
+
+# automount tftp server based on $eth0.serverip
+
+mkdir -p /mnt/tftp
+automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
+
+# SD card slot, boot partition
+mkdir -p /mnt/mmc-boot
+automount -d /mnt/mmc 'mount /dev/disk0.boot /mnt/mmc-boot'
+
+# SD card slot, first partition
+mkdir -p /mnt/mmc
+automount -d /mnt/mmc 'mount /dev/disk0.0 /mnt/mmc'
+
+# AHCI, boot partition
+mkdir -p /mnt/ahci-boot
+automount -d /mnt/ahci 'mount /dev/ata0.boot /mnt/ahci-boot'
+
+# AHCI, first partition
+mkdir -p /mnt/ahci
+automount -d /mnt/ahci 'mount /dev/ata0.0 /mnt/ahci'
diff --git a/arch/arm/boards/highbank/env/init/ps1 b/arch/arm/boards/highbank/env/init/ps1
new file mode 100644
index 0000000000..a94acc14f8
--- /dev/null
+++ b/arch/arm/boards/highbank/env/init/ps1
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+/env/config
+
+if [ ${global.allow_color} = "true" ]; then
+ export PS1="\e[1;32mbarebox@\e[1;36m\h:\w\e[0m\n# "
+else
+ export PS1="barebox@\h:\w\n# "
+fi
diff --git a/arch/arm/configs/phycard_a_l1_defconfig b/arch/arm/configs/phycard_a_l1_defconfig
index d90a333e0a..fabaa2d688 100644
--- a/arch/arm/configs/phycard_a_l1_defconfig
+++ b/arch/arm/configs/phycard_a_l1_defconfig
@@ -7,7 +7,6 @@ CONFIG_CPU_V7=y
CONFIG_CPU_32v7=y
CONFIG_BOARDINFO="Phytec phyCARD-A-L1"
CONFIG_ARCH_OMAP3=y
-CONFIG_OMAP_CLOCK_ALL=y
CONFIG_OMAP_CLOCK_SOURCE_S32K=y
CONFIG_OMAP3_CLOCK_CONFIG=y
CONFIG_OMAP3_COPY_CLOCK_SRAM=n
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index 34fe5c3515..e3ea3b6b9e 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -189,7 +189,7 @@ static int arm_mmu_remap_sdram(struct memory_bank *bank)
ptes, ttb_start, ttb_end);
for (i = 0; i < num_ptes; i++) {
- ptes[i] = (phys + i * 4096) | PTE_TYPE_SMALL |
+ ptes[i] = (phys + i * PAGE_SIZE) | PTE_TYPE_SMALL |
pte_flags_cached;
}
@@ -300,7 +300,7 @@ static int mmu_init(void)
asm volatile ("mcr p15,0,%0,c3,c0,0" : : "r"(i) /*:*/);
/* create a flat mapping using 1MiB sections */
- create_sections(0, 0, 4096, PMD_SECT_AP_WRITE | PMD_SECT_AP_READ |
+ create_sections(0, 0, PAGE_SIZE, PMD_SECT_AP_WRITE | PMD_SECT_AP_READ |
PMD_TYPE_SECT);
vectors_init();
@@ -332,7 +332,7 @@ void *dma_alloc_coherent(size_t size)
void *ret;
size = PAGE_ALIGN(size);
- ret = xmemalign(4096, size);
+ ret = xmemalign(PAGE_SIZE, size);
dma_inv_range((unsigned long)ret, (unsigned long)ret + size);
@@ -353,6 +353,7 @@ void *phys_to_virt(unsigned long phys)
void dma_free_coherent(void *mem, size_t size)
{
+ size = PAGE_ALIGN(size);
remap_range(mem, size, pte_flags_cached);
free(mem);
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index c2618c7b56..0e39a526d2 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -185,10 +185,10 @@ static struct at91_pinctrl_mux_ops at91sam9x5_ops = {
int at91_mux_pin(unsigned pin, enum at91_mux mux, int use_pullup)
{
struct at91_gpio_chip *at91_gpio = pin_to_controller(pin);
- void __iomem *pio = at91_gpio->regbase;
+ void __iomem *pio;
+ struct device_d *dev;
unsigned mask = pin_to_mask(pin);
int bank = pin_to_bank(pin);
- struct device_d *dev = at91_gpio->chip.dev;
if (!at91_gpio)
return -EINVAL;
@@ -197,6 +197,7 @@ int at91_mux_pin(unsigned pin, enum at91_mux mux, int use_pullup)
if (!pio)
return -EINVAL;
+ dev = at91_gpio->chip.dev;
at91_mux_disable_interrupt(pio, mask);
pin %= MAX_NB_GPIO_PER_BANK;
diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c
index b48275e07e..a137da4266 100644
--- a/arch/arm/mach-at91/sam9_smc.c
+++ b/arch/arm/mach-at91/sam9_smc.c
@@ -120,12 +120,12 @@ void sam9_smc_read(int id, int cs, struct sam9_smc_config *config)
static int at91sam9_smc_probe(struct device_d *dev)
{
- int id;
+ int id = dev->id;
- if (dev->id < 0) {
+ if (id < 0) {
id = 0;
- } else if (dev->id > 1) {
- dev_warn(dev, ": id > 2\n");
+ } else if (id > 1) {
+ dev_warn(dev, "id > 1\n");
return -EIO;
}
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index 47c6405eb1..9cfe53968b 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -12,6 +12,7 @@ choice
config MACH_HIGHBANK
bool "Calxeda Highbank"
+ select HAVE_DEFAULT_ENVIRONMENT_NEW
endchoice
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 8ddec9d605..eee6acd04e 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -17,9 +17,9 @@ config ARCH_TEXT_BASE
default 0x87f00000 if MACH_PCM043
default 0x08f80000 if MACH_SCB9328
default 0xa7e00000 if MACH_NESO
- default 0x97f00000 if MACH_MX51_PDK
- default 0x7ff00000 if MACH_MX53_LOCO
- default 0x7ff00000 if MACH_MX53_SMD
+ default 0x97f00000 if MACH_FREESCALE_MX51_PDK
+ default 0x7ff00000 if MACH_FREESCALE_MX53_LOCO
+ default 0x7ff00000 if MACH_FREESCALE_MX53_SMD
default 0x87f00000 if MACH_GUF_CUPID
default 0x93d00000 if MACH_TX25
default 0x7ff00000 if MACH_TQMA53
diff --git a/arch/arm/mach-netx/Kconfig b/arch/arm/mach-netx/Kconfig
index 8d8f49b85d..3c62d605a9 100644
--- a/arch/arm/mach-netx/Kconfig
+++ b/arch/arm/mach-netx/Kconfig
@@ -9,35 +9,19 @@ config BOARDINFO
config NETX_SDRAM_CTRL
hex
- default 0x010D0001 if MACH_NXDKN
default 0x010D0121 if MACH_NXDB500
- default 0x030D0111 if MACH_NXHMIBB
- default 0x010D0111 if MACH_NXEB500HMI
- default 0x030D0001 if MACH_NXHX
config NETX_SDRAM_TIMING_CTRL
hex
- default 0x03C12151 if MACH_NXDKN
default 0x03C13261 if MACH_NXDB500
- default 0x03C13251 if MACH_NXHMIBB
- default 0x03C13251 if MACH_NXEB500HMI
- default 0x03C23251 if MACH_NXHX
config NETX_MEM_CTRL
hex
- default 0x0103030F if MACH_NXDKN
default 0x0203030F if MACH_NXDB500
- default 0x0103030F if MACH_NXHMIBB
- default 0x0103030F if MACH_NXEB500HMI
- default 0x0103030F if MACH_NXHX
config NETX_COOKIE
hex
- default 16 if MACH_NXDKN
default 32 if MACH_NXDB500
- default 16 if MACH_NXHMIBB
- default 16 if MACH_NXEB500HMI
- default 16 if MACH_NXHX
choice
prompt "Netx Board Type"
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index 42e5f4af07..0913d0e13b 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -134,7 +134,6 @@ config MACH_BEAGLE
config MACH_BEAGLEBONE
bool "Texas Instrument's Beagle Bone"
- select OMAP_CLOCK_ALL
depends on ARCH_AM33XX
help
Say Y here if you are using Beagle Bone
@@ -179,7 +178,6 @@ config MACH_PCAAXL2
config MACH_PCM051
bool "Phytec phyCORE pcm051"
- select OMAP_CLOCK_ALL
select HAVE_DEFAULT_ENVIRONMENT_NEW
depends on ARCH_AM33XX
help
diff --git a/arch/arm/mach-omap/omap3_clock.c b/arch/arm/mach-omap/omap3_clock.c
index bcde48ff64..03aca492a1 100644
--- a/arch/arm/mach-omap/omap3_clock.c
+++ b/arch/arm/mach-omap/omap3_clock.c
@@ -652,12 +652,6 @@ void prcm_init(void)
/**
* @brief Enable the clks & power for perifs
*
- * GPT2 Sysclk, ICLK,FCLK, 32k Sync is enabled by default
- * Uses CONFIG_OMAP_CLOCK_UART to enable UART clocks
- * Uses CONFIG_OMAP_CLOCK_I2C to enable I2C clocks
- * Uses CONFIG_OMAP_CLOCK_ALL to enable All Clocks!
- * - Not a wise idea in most cases
- *
* @return void
*/
static void per_clocks_enable(void)