From f3127d1c1f64aa7f748ce4e30d7c8a6314ce83a4 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Tue, 24 Jun 2014 08:33:15 +0200 Subject: arm: imx6: rename hummingboard directory to microsom The rule in barebox is to name the directories after the modules. As hummingboard is just one of the carriers for the MicroSOM module, name the directory accordingly. Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- arch/arm/boards/Makefile | 2 +- arch/arm/boards/solidrun-hummingboard/Makefile | 3 - arch/arm/boards/solidrun-hummingboard/board.c | 91 ---------------------- .../flash-header-solidrun-hummingboard.imxcfg | 79 ------------------- arch/arm/boards/solidrun-hummingboard/lowlevel.c | 16 ---- arch/arm/boards/solidrun-microsom/Makefile | 3 + arch/arm/boards/solidrun-microsom/board.c | 91 ++++++++++++++++++++++ .../flash-header-solidrun-hummingboard.imxcfg | 79 +++++++++++++++++++ arch/arm/boards/solidrun-microsom/lowlevel.c | 16 ++++ arch/arm/configs/imx_v7_defconfig | 2 +- arch/arm/dts/Makefile | 2 +- arch/arm/mach-imx/Kconfig | 4 +- 12 files changed, 194 insertions(+), 194 deletions(-) delete mode 100644 arch/arm/boards/solidrun-hummingboard/Makefile delete mode 100644 arch/arm/boards/solidrun-hummingboard/board.c delete mode 100644 arch/arm/boards/solidrun-hummingboard/flash-header-solidrun-hummingboard.imxcfg delete mode 100644 arch/arm/boards/solidrun-hummingboard/lowlevel.c create mode 100644 arch/arm/boards/solidrun-microsom/Makefile create mode 100644 arch/arm/boards/solidrun-microsom/board.c create mode 100644 arch/arm/boards/solidrun-microsom/flash-header-solidrun-hummingboard.imxcfg create mode 100644 arch/arm/boards/solidrun-microsom/lowlevel.c (limited to 'arch') diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile index 4eccc92930..b8bfb84339 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile @@ -88,7 +88,7 @@ obj-$(CONFIG_MACH_SAMA5D3_XPLAINED) += sama5d3_xplained/ obj-$(CONFIG_MACH_SCB9328) += scb9328/ obj-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += ebv-socrates/ obj-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += terasic-sockit/ -obj-$(CONFIG_MACH_SOLIDRUN_HUMMINGBOARD) += solidrun-hummingboard/ +obj-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += solidrun-microsom/ obj-$(CONFIG_MACH_TNY_A9260) += tny-a926x/ obj-$(CONFIG_MACH_TNY_A9263) += tny-a926x/ obj-$(CONFIG_MACH_TNY_A9G20) += tny-a926x/ diff --git a/arch/arm/boards/solidrun-hummingboard/Makefile b/arch/arm/boards/solidrun-hummingboard/Makefile deleted file mode 100644 index 8b4754e1c1..0000000000 --- a/arch/arm/boards/solidrun-hummingboard/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -obj-y += board.o flash-header-solidrun-hummingboard.dcd.o -extra-y += flash-header-solidrun-hummingboard.dcd.S flash-header-solidrun-hummingboard.dcd -lwl-y += lowlevel.o diff --git a/arch/arm/boards/solidrun-hummingboard/board.c b/arch/arm/boards/solidrun-hummingboard/board.c deleted file mode 100644 index 4b0ea32040..0000000000 --- a/arch/arm/boards/solidrun-hummingboard/board.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2013 Lucas Stach - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static int ar8035_phy_fixup(struct phy_device *dev) -{ - u16 val; - - /* Ar803x phy SmartEEE feature cause link status generates glitch, - * which cause ethernet link down/up issue, so disable SmartEEE - */ - phy_write(dev, 0xd, 0x3); - phy_write(dev, 0xe, 0x805d); - phy_write(dev, 0xd, 0x4003); - - val = phy_read(dev, 0xe); - phy_write(dev, 0xe, val & ~(1 << 8)); - - /* To enable AR8031 ouput a 125MHz clk from CLK_25M */ - phy_write(dev, 0xd, 0x7); - phy_write(dev, 0xe, 0x8016); - phy_write(dev, 0xd, 0x4007); - - val = phy_read(dev, 0xe); - val &= 0xffe3; - val |= 0x18; - phy_write(dev, 0xe, val); - - /* introduce tx clock delay */ - phy_write(dev, 0x1d, 0x5); - val = phy_read(dev, 0x1e); - val |= 0x0100; - phy_write(dev, 0x1e, val); - - return 0; -} - -static int hummingboard_device_init(void) -{ - if (!of_machine_is_compatible("solidrun,hummingboard")) - return 0; - - phy_register_fixup_for_uid(0x004dd072, 0xffffffef, ar8035_phy_fixup); - - /* enable USB VBUS */ - gpio_direction_output(IMX_GPIO_NR(3, 22), 1); - gpio_direction_output(IMX_GPIO_NR(1, 0), 1); - - barebox_set_hostname("hummingboard"); - - return 0; -} -device_initcall(hummingboard_device_init); - -static int hummingboard_late_init(void) -{ - if (!of_machine_is_compatible("solidrun,hummingboard")) - return 0; - - imx6_bbu_internal_mmc_register_handler("sdcard", "/dev/mmc1.barebox", - BBU_HANDLER_FLAG_DEFAULT); - - return 0; -} -late_initcall(hummingboard_late_init); diff --git a/arch/arm/boards/solidrun-hummingboard/flash-header-solidrun-hummingboard.imxcfg b/arch/arm/boards/solidrun-hummingboard/flash-header-solidrun-hummingboard.imxcfg deleted file mode 100644 index b1856b49ce..0000000000 --- a/arch/arm/boards/solidrun-hummingboard/flash-header-solidrun-hummingboard.imxcfg +++ /dev/null @@ -1,79 +0,0 @@ -loadaddr 0x10000000 -soc imx6 -dcdofs 0x400 -wm 32 0x020e0774 0x000c0000 -wm 32 0x020e0754 0x00000000 -wm 32 0x020e04ac 0x00000030 -wm 32 0x020e04b0 0x00000030 -wm 32 0x020e0464 0x00000030 -wm 32 0x020e0490 0x00000030 -wm 32 0x020e074c 0x00000030 -wm 32 0x020e0494 0x00000030 -wm 32 0x020e04a4 0x00003000 -wm 32 0x020e04a8 0x00003000 -wm 32 0x020e04a0 0x00000000 -wm 32 0x020e04b4 0x00003030 -wm 32 0x020e04b8 0x00003030 -wm 32 0x020e076c 0x00000030 -wm 32 0x020e0750 0x00000000 -wm 32 0x020e04bc 0x00000030 -wm 32 0x020e04c0 0x00000030 -wm 32 0x020e04c4 0x00000030 -wm 32 0x020e04c8 0x00000030 -wm 32 0x020e04cc 0x00000000 -wm 32 0x020e04d0 0x00000000 -wm 32 0x020e04d4 0x00000000 -wm 32 0x020e04d8 0x00000000 -wm 32 0x020e0760 0x00000000 -wm 32 0x020e0764 0x00000030 -wm 32 0x020e0770 0x00000030 -wm 32 0x020e0778 0x00000030 -wm 32 0x020e077c 0x00000030 -wm 32 0x020e0780 0x00000000 -wm 32 0x020e0784 0x00000000 -wm 32 0x020e078c 0x00000000 -wm 32 0x020e0748 0x00000000 -wm 32 0x020e0470 0x00000030 -wm 32 0x020e0474 0x00000030 -wm 32 0x020e0478 0x00000030 -wm 32 0x020e047c 0x00000030 -wm 32 0x020e0480 0x00000000 -wm 32 0x020e0484 0x00000000 -wm 32 0x020e0488 0x00000000 -wm 32 0x020e048c 0x00000000 -wm 32 0x021b0800 0xa1390003 -wm 32 0x021b4800 0xa1390003 -wm 32 0x021b080c 0x000F0011 -wm 32 0x021b0810 0x000E000F -wm 32 0x021b083c 0x42240229 -wm 32 0x021b0840 0x021a0219 -wm 32 0x021b0848 0x4e4f5150 -wm 32 0x021b0850 0x35363136 -wm 32 0x021b081c 0x33333333 -wm 32 0x021b0820 0x33333333 -wm 32 0x021b0824 0x33333333 -wm 32 0x021b0828 0x33333333 -wm 32 0x021b08b8 0x00000800 -wm 32 0x021b48b8 0x00000800 -wm 32 0x021b0004 0x0002002d -wm 32 0x021b0008 0x00333030 -wm 32 0x021b000c 0x40445323 -wm 32 0x021b0010 0xb68e8c63 -wm 32 0x021b0014 0x01ff00db -wm 32 0x021b0018 0x00001740 -wm 32 0x021b001c 0x00008000 -wm 32 0x021b002c 0x000026d2 -wm 32 0x021b0030 0x00440e21 -wm 32 0x021b0040 0x00000017 -wm 32 0x021b0400 0x11420000 -wm 32 0x021b0000 0x83190000 -wm 32 0x021b001c 0x04008032 -wm 32 0x021b001c 0x00008033 -wm 32 0x021b001c 0x00428031 -wm 32 0x021b001c 0x07208030 -wm 32 0x021b001c 0x04008040 -wm 32 0x021b0020 0x00005800 -wm 32 0x021b0818 0x00000007 -wm 32 0x021b0004 0x0002556d -wm 32 0x021b0404 0x00011006 -wm 32 0x021b001c 0x00000000 diff --git a/arch/arm/boards/solidrun-hummingboard/lowlevel.c b/arch/arm/boards/solidrun-hummingboard/lowlevel.c deleted file mode 100644 index 8710d85c75..0000000000 --- a/arch/arm/boards/solidrun-hummingboard/lowlevel.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include -#include -#include - -extern char __dtb_imx6dl_hummingboard_start[]; - -ENTRY_FUNCTION(start_imx6dl_hummingboard, r0, r1, r2) -{ - void *fdt; - - arm_cpu_lowlevel_init(); - - fdt = __dtb_imx6dl_hummingboard_start - get_runtime_offset(); - barebox_arm_entry(0x10000000, SZ_512M, fdt); -} diff --git a/arch/arm/boards/solidrun-microsom/Makefile b/arch/arm/boards/solidrun-microsom/Makefile new file mode 100644 index 0000000000..8b4754e1c1 --- /dev/null +++ b/arch/arm/boards/solidrun-microsom/Makefile @@ -0,0 +1,3 @@ +obj-y += board.o flash-header-solidrun-hummingboard.dcd.o +extra-y += flash-header-solidrun-hummingboard.dcd.S flash-header-solidrun-hummingboard.dcd +lwl-y += lowlevel.o diff --git a/arch/arm/boards/solidrun-microsom/board.c b/arch/arm/boards/solidrun-microsom/board.c new file mode 100644 index 0000000000..4b0ea32040 --- /dev/null +++ b/arch/arm/boards/solidrun-microsom/board.c @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2013 Lucas Stach + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int ar8035_phy_fixup(struct phy_device *dev) +{ + u16 val; + + /* Ar803x phy SmartEEE feature cause link status generates glitch, + * which cause ethernet link down/up issue, so disable SmartEEE + */ + phy_write(dev, 0xd, 0x3); + phy_write(dev, 0xe, 0x805d); + phy_write(dev, 0xd, 0x4003); + + val = phy_read(dev, 0xe); + phy_write(dev, 0xe, val & ~(1 << 8)); + + /* To enable AR8031 ouput a 125MHz clk from CLK_25M */ + phy_write(dev, 0xd, 0x7); + phy_write(dev, 0xe, 0x8016); + phy_write(dev, 0xd, 0x4007); + + val = phy_read(dev, 0xe); + val &= 0xffe3; + val |= 0x18; + phy_write(dev, 0xe, val); + + /* introduce tx clock delay */ + phy_write(dev, 0x1d, 0x5); + val = phy_read(dev, 0x1e); + val |= 0x0100; + phy_write(dev, 0x1e, val); + + return 0; +} + +static int hummingboard_device_init(void) +{ + if (!of_machine_is_compatible("solidrun,hummingboard")) + return 0; + + phy_register_fixup_for_uid(0x004dd072, 0xffffffef, ar8035_phy_fixup); + + /* enable USB VBUS */ + gpio_direction_output(IMX_GPIO_NR(3, 22), 1); + gpio_direction_output(IMX_GPIO_NR(1, 0), 1); + + barebox_set_hostname("hummingboard"); + + return 0; +} +device_initcall(hummingboard_device_init); + +static int hummingboard_late_init(void) +{ + if (!of_machine_is_compatible("solidrun,hummingboard")) + return 0; + + imx6_bbu_internal_mmc_register_handler("sdcard", "/dev/mmc1.barebox", + BBU_HANDLER_FLAG_DEFAULT); + + return 0; +} +late_initcall(hummingboard_late_init); diff --git a/arch/arm/boards/solidrun-microsom/flash-header-solidrun-hummingboard.imxcfg b/arch/arm/boards/solidrun-microsom/flash-header-solidrun-hummingboard.imxcfg new file mode 100644 index 0000000000..b1856b49ce --- /dev/null +++ b/arch/arm/boards/solidrun-microsom/flash-header-solidrun-hummingboard.imxcfg @@ -0,0 +1,79 @@ +loadaddr 0x10000000 +soc imx6 +dcdofs 0x400 +wm 32 0x020e0774 0x000c0000 +wm 32 0x020e0754 0x00000000 +wm 32 0x020e04ac 0x00000030 +wm 32 0x020e04b0 0x00000030 +wm 32 0x020e0464 0x00000030 +wm 32 0x020e0490 0x00000030 +wm 32 0x020e074c 0x00000030 +wm 32 0x020e0494 0x00000030 +wm 32 0x020e04a4 0x00003000 +wm 32 0x020e04a8 0x00003000 +wm 32 0x020e04a0 0x00000000 +wm 32 0x020e04b4 0x00003030 +wm 32 0x020e04b8 0x00003030 +wm 32 0x020e076c 0x00000030 +wm 32 0x020e0750 0x00000000 +wm 32 0x020e04bc 0x00000030 +wm 32 0x020e04c0 0x00000030 +wm 32 0x020e04c4 0x00000030 +wm 32 0x020e04c8 0x00000030 +wm 32 0x020e04cc 0x00000000 +wm 32 0x020e04d0 0x00000000 +wm 32 0x020e04d4 0x00000000 +wm 32 0x020e04d8 0x00000000 +wm 32 0x020e0760 0x00000000 +wm 32 0x020e0764 0x00000030 +wm 32 0x020e0770 0x00000030 +wm 32 0x020e0778 0x00000030 +wm 32 0x020e077c 0x00000030 +wm 32 0x020e0780 0x00000000 +wm 32 0x020e0784 0x00000000 +wm 32 0x020e078c 0x00000000 +wm 32 0x020e0748 0x00000000 +wm 32 0x020e0470 0x00000030 +wm 32 0x020e0474 0x00000030 +wm 32 0x020e0478 0x00000030 +wm 32 0x020e047c 0x00000030 +wm 32 0x020e0480 0x00000000 +wm 32 0x020e0484 0x00000000 +wm 32 0x020e0488 0x00000000 +wm 32 0x020e048c 0x00000000 +wm 32 0x021b0800 0xa1390003 +wm 32 0x021b4800 0xa1390003 +wm 32 0x021b080c 0x000F0011 +wm 32 0x021b0810 0x000E000F +wm 32 0x021b083c 0x42240229 +wm 32 0x021b0840 0x021a0219 +wm 32 0x021b0848 0x4e4f5150 +wm 32 0x021b0850 0x35363136 +wm 32 0x021b081c 0x33333333 +wm 32 0x021b0820 0x33333333 +wm 32 0x021b0824 0x33333333 +wm 32 0x021b0828 0x33333333 +wm 32 0x021b08b8 0x00000800 +wm 32 0x021b48b8 0x00000800 +wm 32 0x021b0004 0x0002002d +wm 32 0x021b0008 0x00333030 +wm 32 0x021b000c 0x40445323 +wm 32 0x021b0010 0xb68e8c63 +wm 32 0x021b0014 0x01ff00db +wm 32 0x021b0018 0x00001740 +wm 32 0x021b001c 0x00008000 +wm 32 0x021b002c 0x000026d2 +wm 32 0x021b0030 0x00440e21 +wm 32 0x021b0040 0x00000017 +wm 32 0x021b0400 0x11420000 +wm 32 0x021b0000 0x83190000 +wm 32 0x021b001c 0x04008032 +wm 32 0x021b001c 0x00008033 +wm 32 0x021b001c 0x00428031 +wm 32 0x021b001c 0x07208030 +wm 32 0x021b001c 0x04008040 +wm 32 0x021b0020 0x00005800 +wm 32 0x021b0818 0x00000007 +wm 32 0x021b0004 0x0002556d +wm 32 0x021b0404 0x00011006 +wm 32 0x021b001c 0x00000000 diff --git a/arch/arm/boards/solidrun-microsom/lowlevel.c b/arch/arm/boards/solidrun-microsom/lowlevel.c new file mode 100644 index 0000000000..8710d85c75 --- /dev/null +++ b/arch/arm/boards/solidrun-microsom/lowlevel.c @@ -0,0 +1,16 @@ +#include +#include +#include +#include + +extern char __dtb_imx6dl_hummingboard_start[]; + +ENTRY_FUNCTION(start_imx6dl_hummingboard, r0, r1, r2) +{ + void *fdt; + + arm_cpu_lowlevel_init(); + + fdt = __dtb_imx6dl_hummingboard_start - get_runtime_offset(); + barebox_arm_entry(0x10000000, SZ_512M, fdt); +} diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig index 0c32d7d972..315d7e9314 100644 --- a/arch/arm/configs/imx_v7_defconfig +++ b/arch/arm/configs/imx_v7_defconfig @@ -15,7 +15,7 @@ CONFIG_MACH_TQMA6X=y CONFIG_MACH_SABRELITE=y CONFIG_MACH_SABRESD=y CONFIG_MACH_NITROGEN6X=y -CONFIG_MACH_SOLIDRUN_HUMMINGBOARD=y +CONFIG_MACH_SOLIDRUN_MICROSOM=y CONFIG_MACH_EMBEST_RIOTBOARD=y CONFIG_MACH_UDOO=y CONFIG_MACH_VARISCITE_MX6=y diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 6bbb4dcbed..a9bb20e069 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -69,7 +69,7 @@ pbl-$(CONFIG_MACH_TX25) += imx25-karo-tx25.dtb.o pbl-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o pbl-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += socfpga_cyclone5_socrates.dtb.o pbl-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += socfpga_cyclone5_sockit.dtb.o -pbl-$(CONFIG_MACH_SOLIDRUN_HUMMINGBOARD) += imx6dl-hummingboard.dtb.o +pbl-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += imx6dl-hummingboard.dtb.o pbl-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o pbl-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o pbl-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index e1b4e31195..2d99f3eec5 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -269,8 +269,8 @@ config MACH_NITROGEN6X bool "BoundaryDevices Nitrogen6x" select ARCH_IMX6 -config MACH_SOLIDRUN_HUMMINGBOARD - bool "SolidRun Hummingboard" +config MACH_SOLIDRUN_MICROSOM + bool "SolidRun MicroSOM based devices" select ARCH_IMX6 config MACH_EMBEST_RIOTBOARD -- cgit v1.2.3