U-Boot
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
February 2015
- 190 participants
- 588 discussions

Re: [U-Boot] [linux-sunxi] [UBOOT] Both Linux-Sunxi and Mainline Uboot have issues
by Hans de Goede 20 Feb '15
by Hans de Goede 20 Feb '15
20 Feb '15
Hi,
On 19-02-15 13:38, Siarhei Siamashka wrote:
> On Wed, 18 Feb 2015 22:29:07 -0800 (PST)
> TsvetanUsunov <tsvetanusunov(a)gmail.com> wrote:
>
>> Hi
>>
>> For A13-OLinuxino till now we conservatively used the Linux-Sunxi uboot,
>> but we recently got new lot of Samsung memories and we decided to tweak
>> some parameters for this DDR in Linux-Sunxi uboot and found problems.
>> As this uboot is with status not maintained anymore I will not discuss the
>> problems, as probably no one will spend time on it,
<snip>
>> The PLL5 and PLL6 values are changed and this cause problems, this is what
>> we found so far:
<snip>
>> 1. mainline u-boot
>> =================
>> 1.1 pll5
>> address 0x01c20020, value 0xb1049091 - P=1, N=16, K=2, M=2.
>> The PLL5 output for DDR = (24MHz*N*K)/M. DDR=24*16*2/2 = 384MHz
>> The PLL5 output for other module = (24MHz*N*K)/P. DDR=24*16*2/1 = 768MHz -
>> This high frequency cause LCDs connected to the board to flicker
>
> Yes, this was already known. And had been addressed a long time ago.
> Hans has a more detailed reply, so I'm not going to duplicate it.
>
>> 1.2 pll6
>> address 0x01c20028, value 0xA1009900 - N=25, K=1, M=1
This is not the value set by u-boot, u-boot sets this to
0xA1009911
>> The PLL6 output is (24MHz*N*K)/M/2 = 24*25*1/1/2 = 300MHz
And this formula from the A13 user manual is wrong I've run several
tests and the formula from the A10/A20 user manual, as used by the
allwinner kernel sources, upstream u-boot and upstream kernel:
PLL6 = (24MHz*N*K)/2
Is the correct one. This means that what u-boot is doing:
PLL6 = 0xA1009911, MBUS = 0x81000001
Results in PLL6 = 600 MHz , MBUS = 600 / 2 = 300 MHz so upstream
u-boot actually gives you more MBUS bandwidth to work with, as
intended.
But then the linux-sunxi-3.4 kernel comes along and sets PLL6 to:
0xA1009900 which translates to 300 MHz (in both the wrong and
correct formula) and you end up with an MBUS of only 150 MHz.
>> 1.3 MBUS clock
>> address 0x01c2015c, value 0x81000001 - MBUS clock source is PLL6/2 = 300/2
>> = 150MHz - This is connected to PLL6 setup, at this 150 Mhz the board cant
>> play video smoothly and sometimes drop video packets when the video is
>> playing
>
> Right. Having a reasonably fast MBUS clock speed is very important for
> performance.
>
>> 2. sunxi u-boot
>> =================
>> 1.1 pll5
>> address 0x01c20020, value 0xb1049091 - P=2, N=17, K=2, M=2.
>> The PLL5 output for DDR = (24MHz*N*K)/M. DDR=24*17*2/2 = 408MHz
>> The PLL5 output for other module = (24MHz*N*K)/P. DDR=24*16*2/2 = 408MHz -
>> this frequency was OK, There is no problem with LCD flickering, why the
>> frequency increase was necessary?
>> 1.2 pll6
>> address 0x01c20028, value 0xA1009900 - N=25, K=1, M=1
>> The PLL6 output is (24MHz*N*K)/M/2 = 24*25*1/1/2 = 300MHz
>
> Thanks a lot for finding and reporting this particular problem.
>
> Based on a quick look, the most likely culprit seems to be the
> 'c' function in u-boot, which is providing wrong
> information to the DRAM code. But Hans is already working on a
> fix, so I'm not going to get involved yet.
Nope, the user manual for A13 is wrong (see above).
> Additionally, the sunxi-3.4 kernel is trying to re-configure PLL6 in
> 'arch/arm/mach-sun5i/clock/clock.c', which is a bit of a mess. As you
> have the problem, most likely it also ends up being 300MHz there.
> Probably the sunxi-3.4 kernel should not touch PLL6 at all and keep
> the settings from u-boot.
Oh, thanks for pointing that out, that explains why Tsvetan is seeing
0xA1009900 for the PLL6 setting, and explains his problem (see analysis
above).
I've attached a patch which should fix this, Tsvetan note that you
need to build with old kernel compatibility enabled for this fix to
work, as explained in my previous mail. Please let me know if this
fixes things then I'll push it upstream ASAP.
And someone should also write a kernel patch for the linux-sunxi kernel
to not touch pll6 on sun5i.
Regards,
Hans
2
1

[U-Boot] [RFC PATCH v2 0/19] ARM: start to move SoC code into arch/arm/mach-*
by Masahiro Yamada 20 Feb '15
by Masahiro Yamada 20 Feb '15
20 Feb '15
This series can be applied on the current u-boot/master
(commit 1320112c8aa58345d71a5a46f3bf6a52589f1f2b)
Just rebased onto u-boot/master.
No other specail update from the RFC version.
Masahiro Yamada (19):
ARM: at91: move board select menu and common settings
ARM: prepare for moving SoC sources into mach-*
ARM: at91: collect SoC sources into mach-at91
ARM: tegra: collect SoC sources into mach-tegra
ARM: davinci: move SoC sources to mach-davinci
ARM: kirkwood: move SOC sources to mach-kirkwood
ARM: nomadik: move SoC sources to mach-nomadik
ARM: highbank: move SoC sources to mach-highbank
ARM: orion5x: move SoC sources to mach-orion5x
ARM: versatile: move SoC sources to mach-versatile
ARM: keystone: move SoC sources to mach-keystone
kbuild: prepare for moving headers into mach-*/include/mach
ARM: at91: move SoC headers to mach-at91/include/mach
ARM: davinci: move SoC headers to mach-davinci/include/mach
ARM: kirkwood: move SoC headers to mach-kirkwood/include/mach
ARM: nomadik: move SoC headers to mach-nomadik/include/mach
ARM: orion5x: move SoC headers to mach-orion5x/include/mach
ARM: keystone: move SoC headers to mach-keystone/include/mach
ARM: prepare for including <mach/*.h>
MAINTAINERS | 11 +-
arch/arm/Kconfig | 175 ++-------------------
arch/arm/Makefile | 24 +++
arch/arm/cpu/Makefile | 7 +-
arch/arm/cpu/arm720t/Makefile | 6 -
arch/arm/cpu/arm720t/tegra-common/Makefile | 11 --
arch/arm/cpu/arm720t/tegra114/Makefile | 21 ---
arch/arm/cpu/arm720t/tegra124/Makefile | 8 -
arch/arm/cpu/arm720t/tegra20/Makefile | 10 --
arch/arm/cpu/arm720t/tegra30/Makefile | 20 ---
arch/arm/cpu/arm920t/Makefile | 1 -
arch/arm/cpu/arm926ejs/Makefile | 6 -
arch/arm/cpu/arm926ejs/at91/config.mk | 2 -
arch/arm/cpu/armv7/Makefile | 5 -
arch/arm/cpu/armv7/at91/config.mk | 8 -
arch/arm/cpu/armv7/tegra-common/Makefile | 10 --
arch/arm/cpu/armv7/tegra20/Makefile | 11 --
arch/arm/mach-at91/Kconfig | 168 ++++++++++++++++++++
arch/arm/{cpu/at91-common => mach-at91}/Makefile | 14 +-
.../arm920t/at91 => mach-at91/arm920t}/Makefile | 0
.../arm920t}/at91rm9200_devices.c | 0
.../arm920t/at91 => mach-at91/arm920t}/clock.c | 0
.../{cpu/arm920t/at91 => mach-at91/arm920t}/cpu.c | 0
.../at91 => mach-at91/arm920t}/lowlevel_init.S | 0
.../arm920t/at91 => mach-at91/arm920t}/reset.c | 0
.../arm920t/at91 => mach-at91/arm920t}/timer.c | 0
.../at91 => mach-at91/arm926ejs}/Makefile | 0
.../arm926ejs}/at91sam9260_devices.c | 0
.../arm926ejs}/at91sam9261_devices.c | 0
.../arm926ejs}/at91sam9263_devices.c | 0
.../arm926ejs}/at91sam9m10g45_devices.c | 0
.../arm926ejs}/at91sam9n12_devices.c | 0
.../arm926ejs}/at91sam9rl_devices.c | 0
.../arm926ejs}/at91sam9x5_devices.c | 0
.../arm926ejs/at91 => mach-at91/arm926ejs}/clock.c | 0
.../arm926ejs/at91 => mach-at91/arm926ejs}/cpu.c | 0
.../at91 => mach-at91/arm926ejs}/eflash.c | 0
.../arm926ejs/at91 => mach-at91/arm926ejs}/led.c | 0
.../at91 => mach-at91/arm926ejs}/lowlevel_init.S | 0
.../arm926ejs/at91 => mach-at91/arm926ejs}/reset.c | 0
.../arm926ejs/at91 => mach-at91/arm926ejs}/timer.c | 0
.../{cpu/armv7/at91 => mach-at91/armv7}/Makefile | 0
.../{cpu/armv7/at91 => mach-at91/armv7}/clock.c | 0
arch/arm/{cpu/armv7/at91 => mach-at91/armv7}/cpu.c | 0
.../{cpu/armv7/at91 => mach-at91/armv7}/reset.c | 0
.../at91 => mach-at91/armv7}/sama5d3_devices.c | 0
.../at91 => mach-at91/armv7}/sama5d4_devices.c | 0
.../{cpu/armv7/at91 => mach-at91/armv7}/timer.c | 0
arch/arm/mach-at91/config.mk | 9 ++
.../include/mach}/at91_common.h | 0
.../include/mach}/at91_dbu.h | 0
.../include/mach}/at91_eefc.h | 0
.../include/mach}/at91_emac.h | 0
.../include/mach}/at91_gpbr.h | 0
.../include/mach}/at91_matrix.h | 0
.../arch-at91 => mach-at91/include/mach}/at91_mc.h | 0
.../include/mach}/at91_pdc.h | 0
.../include/mach}/at91_pio.h | 0
.../include/mach}/at91_pit.h | 0
.../include/mach}/at91_pmc.h | 0
.../include/mach}/at91_rstc.h | 0
.../include/mach}/at91_rtt.h | 0
.../include/mach}/at91_spi.h | 0
.../arch-at91 => mach-at91/include/mach}/at91_st.h | 0
.../arch-at91 => mach-at91/include/mach}/at91_tc.h | 0
.../include/mach}/at91_wdt.h | 0
.../include/mach}/at91rm9200.h | 0
.../include/mach}/at91sam9260.h | 0
.../include/mach}/at91sam9260_matrix.h | 0
.../include/mach}/at91sam9261.h | 0
.../include/mach}/at91sam9261_matrix.h | 0
.../include/mach}/at91sam9263.h | 0
.../include/mach}/at91sam9263_matrix.h | 0
.../include/mach}/at91sam9_matrix.h | 0
.../include/mach}/at91sam9_sdramc.h | 0
.../include/mach}/at91sam9_smc.h | 0
.../include/mach}/at91sam9g45.h | 0
.../include/mach}/at91sam9g45_matrix.h | 0
.../include/mach}/at91sam9rl.h | 0
.../include/mach}/at91sam9rl_matrix.h | 0
.../include/mach}/at91sam9x5.h | 0
.../include/mach}/at91sam9x5_matrix.h | 0
.../include/mach}/atmel_mpddrc.h | 0
.../include/mach}/atmel_serial.h | 0
.../include/mach}/atmel_usba_udc.h | 0
.../asm/arch-at91 => mach-at91/include/mach}/clk.h | 0
.../arch-at91 => mach-at91/include/mach}/gpio.h | 0
.../include/mach}/hardware.h | 0
.../arch-at91 => mach-at91/include/mach}/sama5d3.h | 0
.../include/mach}/sama5d3_smc.h | 0
.../arch-at91 => mach-at91/include/mach}/sama5d4.h | 0
arch/arm/{cpu/at91-common => mach-at91}/mpddrc.c | 0
arch/arm/{cpu/at91-common => mach-at91}/phy.c | 0
arch/arm/{cpu/at91-common => mach-at91}/sdram.c | 0
arch/arm/{cpu/at91-common => mach-at91}/spl.c | 0
arch/arm/{cpu/at91-common => mach-at91}/spl_at91.c | 0
.../arm/{cpu/at91-common => mach-at91}/spl_atmel.c | 0
.../{cpu/at91-common => mach-at91}/u-boot-spl.lds | 0
.../arm926ejs/davinci => mach-davinci}/Kconfig | 0
.../arm926ejs/davinci => mach-davinci}/Makefile | 0
.../arm926ejs/davinci => mach-davinci}/config.mk | 0
.../{cpu/arm926ejs/davinci => mach-davinci}/cpu.c | 0
.../davinci => mach-davinci}/da830_pinmux.c | 0
.../davinci => mach-davinci}/da850_lowlevel.c | 0
.../davinci => mach-davinci}/da850_pinmux.c | 0
.../arm926ejs/davinci => mach-davinci}/dm355.c | 0
.../arm926ejs/davinci => mach-davinci}/dm365.c | 0
.../davinci => mach-davinci}/dm365_lowlevel.c | 0
.../arm926ejs/davinci => mach-davinci}/dm644x.c | 0
.../arm926ejs/davinci => mach-davinci}/dm646x.c | 0
.../arm926ejs/davinci => mach-davinci}/dp83848.c | 2 +-
.../arm926ejs/davinci => mach-davinci}/et1011c.c | 2 +-
.../include/mach}/aintc_defs.h | 0
.../include/mach}/da850_lowlevel.h | 0
.../include/mach}/da8xx-usb.h | 0
.../include/mach}/davinci_misc.h | 0
.../include/mach}/ddr2_defs.h | 0
.../include/mach}/dm365_lowlevel.h | 0
.../include/mach}/emac_defs.h | 0
.../include/mach}/gpio.h | 0
.../include/mach}/hardware.h | 0
.../include/mach}/i2c_defs.h | 0
.../include/mach}/pinmux_defs.h | 0
.../include/mach}/pll_defs.h | 0
.../include/mach}/psc_defs.h | 0
.../include/mach}/sdmmc_defs.h | 0
.../include/mach}/syscfg_defs.h | 0
.../include/mach}/timer_defs.h | 0
.../arm926ejs/davinci => mach-davinci}/ksz8873.c | 2 +-
.../davinci => mach-davinci}/lowlevel_init.S | 0
.../arm926ejs/davinci => mach-davinci}/lxt972.c | 2 +-
.../{cpu/arm926ejs/davinci => mach-davinci}/misc.c | 0
.../arm926ejs/davinci => mach-davinci}/pinmux.c | 0
.../{cpu/arm926ejs/davinci => mach-davinci}/psc.c | 0
.../arm926ejs/davinci => mach-davinci}/reset.c | 0
.../{cpu/arm926ejs/davinci => mach-davinci}/spl.c | 0
.../arm926ejs/davinci => mach-davinci}/timer.c | 0
.../{cpu/armv7/highbank => mach-highbank}/Kconfig | 0
.../{cpu/armv7/highbank => mach-highbank}/Makefile | 0
.../{cpu/armv7/highbank => mach-highbank}/timer.c | 0
.../{cpu/armv7/keystone => mach-keystone}/Kconfig | 0
.../{cpu/armv7/keystone => mach-keystone}/Makefile | 0
.../armv7/keystone => mach-keystone}/clock-k2e.c | 0
.../armv7/keystone => mach-keystone}/clock-k2hk.c | 0
.../armv7/keystone => mach-keystone}/clock-k2l.c | 0
.../{cpu/armv7/keystone => mach-keystone}/clock.c | 0
.../armv7/keystone => mach-keystone}/cmd_clock.c | 0
.../armv7/keystone => mach-keystone}/cmd_ddr3.c | 0
.../armv7/keystone => mach-keystone}/cmd_mon.c | 0
.../{cpu/armv7/keystone => mach-keystone}/ddr3.c | 0
.../include/mach}/clock-k2e.h | 0
.../include/mach}/clock-k2hk.h | 0
.../include/mach}/clock-k2l.h | 0
.../include/mach}/clock.h | 0
.../include/mach}/clock_defs.h | 0
.../include/mach}/ddr3.h | 0
.../include/mach}/hardware-k2e.h | 0
.../include/mach}/hardware-k2hk.h | 0
.../include/mach}/hardware-k2l.h | 0
.../include/mach}/hardware.h | 0
.../include/mach}/i2c_defs.h | 0
.../include/mach}/mon.h | 0
.../include/mach}/msmc.h | 0
.../include/mach}/psc_defs.h | 0
.../include/mach}/xhci-keystone.h | 0
.../{cpu/armv7/keystone => mach-keystone}/init.c | 0
.../armv7/keystone => mach-keystone}/keystone.c | 0
.../{cpu/armv7/keystone => mach-keystone}/msmc.c | 0
.../{cpu/armv7/keystone => mach-keystone}/psc.c | 0
.../arm926ejs/kirkwood => mach-kirkwood}/Kconfig | 0
.../arm926ejs/kirkwood => mach-kirkwood}/Makefile | 0
.../arm926ejs/kirkwood => mach-kirkwood}/cache.c | 0
.../arm926ejs/kirkwood => mach-kirkwood}/cpu.c | 0
.../include/mach}/config.h | 0
.../include/mach}/cpu.h | 0
.../include/mach}/gpio.h | 0
.../include/mach}/kw88f6192.h | 0
.../include/mach}/kw88f6281.h | 0
.../include/mach}/mpp.h | 0
.../include/mach}/soc.h | 0
.../arm926ejs/kirkwood => mach-kirkwood}/mpp.c | 0
.../arm926ejs/nomadik => mach-nomadik}/Kconfig | 0
.../arm926ejs/nomadik => mach-nomadik}/Makefile | 0
.../{cpu/arm926ejs/nomadik => mach-nomadik}/gpio.c | 0
.../include/mach}/gpio.h | 0
.../include/mach}/mtu.h | 0
.../arm926ejs/nomadik => mach-nomadik}/reset.S | 0
.../arm926ejs/nomadik => mach-nomadik}/timer.c | 0
.../arm926ejs/orion5x => mach-orion5x}/Kconfig | 0
.../arm926ejs/orion5x => mach-orion5x}/Makefile | 0
.../{cpu/arm926ejs/orion5x => mach-orion5x}/cpu.c | 0
.../{cpu/arm926ejs/orion5x => mach-orion5x}/dram.c | 0
.../include/mach}/cpu.h | 0
.../include/mach}/mv88f5182.h | 0
.../include/mach}/orion5x.h | 0
.../orion5x => mach-orion5x}/lowlevel_init.S | 0
.../arm926ejs/orion5x => mach-orion5x}/timer.c | 0
.../{cpu/armv7/tegra-common => mach-tegra}/Kconfig | 8 +-
arch/arm/{cpu/tegra-common => mach-tegra}/Makefile | 12 ++
arch/arm/{cpu/tegra-common => mach-tegra}/ap.c | 0
arch/arm/{cpu/tegra-common => mach-tegra}/board.c | 0
arch/arm/{cpu/tegra-common => mach-tegra}/cache.c | 0
arch/arm/{cpu/tegra-common => mach-tegra}/clock.c | 0
.../tegra-common => mach-tegra}/cmd_enterrcm.c | 0
.../{cpu/arm720t/tegra-common => mach-tegra}/cpu.c | 0
.../{cpu/arm720t/tegra-common => mach-tegra}/cpu.h | 0
.../tegra-common => mach-tegra}/lowlevel_init.S | 0
.../tegra-common => mach-tegra}/pinmux-common.c | 0
.../{cpu/tegra-common => mach-tegra}/powergate.c | 0
.../{cpu/arm720t/tegra-common => mach-tegra}/spl.c | 0
.../{cpu/tegra-common => mach-tegra}/sys_info.c | 0
.../arm/{cpu/armv7 => mach-tegra}/tegra114/Kconfig | 0
.../tegra114}/Makefile | 5 +-
.../tegra114}/clock.c | 0
.../arm/{cpu/arm720t => mach-tegra}/tegra114/cpu.c | 2 +-
.../tegra114}/funcmux.c | 0
.../tegra114}/pinmux.c | 0
.../arm/{cpu/armv7 => mach-tegra}/tegra124/Kconfig | 0
.../tegra124}/Makefile | 2 +
.../tegra124}/clock.c | 0
.../arm/{cpu/arm720t => mach-tegra}/tegra124/cpu.c | 2 +-
.../tegra124}/funcmux.c | 0
.../tegra124}/pinmux.c | 0
.../tegra124}/xusb-padctl.c | 0
arch/arm/{cpu/armv7 => mach-tegra}/tegra20/Kconfig | 0
.../tegra20-common => mach-tegra/tegra20}/Makefile | 10 +-
.../tegra20-common => mach-tegra/tegra20}/clock.c | 0
arch/arm/{cpu/arm720t => mach-tegra}/tegra20/cpu.c | 2 +-
.../tegra20-common => mach-tegra/tegra20}/crypto.c | 0
.../tegra20-common => mach-tegra/tegra20}/crypto.h | 0
.../{cpu/armv7 => mach-tegra}/tegra20/display.c | 0
.../tegra20-common => mach-tegra/tegra20}/emc.c | 0
.../tegra20}/funcmux.c | 0
.../tegra20-common => mach-tegra/tegra20}/pinmux.c | 0
.../tegra20-common => mach-tegra/tegra20}/pmu.c | 0
arch/arm/{cpu/armv7 => mach-tegra}/tegra20/pwm.c | 0
.../tegra20}/warmboot.c | 0
.../tegra20}/warmboot_avp.c | 0
.../tegra20}/warmboot_avp.h | 0
arch/arm/{cpu/armv7 => mach-tegra}/tegra30/Kconfig | 0
.../tegra30-common => mach-tegra/tegra30}/Makefile | 5 +-
.../tegra30-common => mach-tegra/tegra30}/clock.c | 0
arch/arm/{cpu/arm720t => mach-tegra}/tegra30/cpu.c | 2 +-
.../tegra30}/funcmux.c | 0
.../tegra30-common => mach-tegra/tegra30}/pinmux.c | 0
arch/arm/{cpu/tegra-common => mach-tegra}/vpr.c | 0
.../{cpu/tegra-common => mach-tegra}/xusb-padctl.c | 0
.../arm926ejs/versatile => mach-versatile}/Kconfig | 0
.../versatile => mach-versatile}/Makefile | 0
.../arm926ejs/versatile => mach-versatile}/reset.S | 0
.../arm926ejs/versatile => mach-versatile}/timer.c | 0
board/BuS/eb_cpux9k2/Kconfig | 3 -
board/BuS/vl_ma2sc/Kconfig | 3 -
board/afeb9260/Kconfig | 3 -
board/atmel/at91rm9200ek/Kconfig | 3 -
board/atmel/at91sam9260ek/Kconfig | 3 -
board/atmel/at91sam9261ek/Kconfig | 3 -
board/atmel/at91sam9263ek/Kconfig | 3 -
board/atmel/at91sam9m10g45ek/Kconfig | 3 -
board/atmel/at91sam9n12ek/Kconfig | 3 -
board/atmel/at91sam9rlek/Kconfig | 3 -
board/atmel/at91sam9x5ek/Kconfig | 3 -
board/atmel/sama5d3_xplained/Kconfig | 3 -
board/atmel/sama5d3xek/Kconfig | 3 -
board/atmel/sama5d4_xplained/Kconfig | 3 -
board/atmel/sama5d4ek/Kconfig | 3 -
board/bluewater/snapper9260/Kconfig | 3 -
board/calao/sbc35_a9g20/Kconfig | 3 -
board/calao/tny_a9260/Kconfig | 3 -
board/calao/usb_a9263/Kconfig | 3 -
board/egnite/ethernut5/Kconfig | 3 -
board/esd/meesc/Kconfig | 3 -
board/esd/otc570/Kconfig | 3 -
board/eukrea/cpu9260/Kconfig | 3 -
board/eukrea/cpuat91/Kconfig | 3 -
board/ronetix/pm9261/Kconfig | 3 -
board/ronetix/pm9263/Kconfig | 3 -
board/ronetix/pm9g45/Kconfig | 3 -
board/siemens/corvus/Kconfig | 3 -
board/siemens/taurus/Kconfig | 3 -
board/taskit/stamp9g20/Kconfig | 3 -
configs/afeb9260_defconfig | 1 +
configs/at91rm9200ek_defconfig | 1 +
configs/at91rm9200ek_ram_defconfig | 1 +
configs/at91sam9260ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9260ek_dataflash_cs1_defconfig | 1 +
configs/at91sam9260ek_nandflash_defconfig | 1 +
configs/at91sam9261ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9261ek_dataflash_cs3_defconfig | 1 +
configs/at91sam9261ek_nandflash_defconfig | 1 +
configs/at91sam9263ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9263ek_dataflash_defconfig | 1 +
configs/at91sam9263ek_nandflash_defconfig | 1 +
configs/at91sam9263ek_norflash_boot_defconfig | 1 +
configs/at91sam9263ek_norflash_defconfig | 1 +
configs/at91sam9g10ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9g10ek_dataflash_cs3_defconfig | 1 +
configs/at91sam9g10ek_nandflash_defconfig | 1 +
configs/at91sam9g20ek_2mmc_defconfig | 1 +
configs/at91sam9g20ek_2mmc_nandflash_defconfig | 1 +
configs/at91sam9g20ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9g20ek_dataflash_cs1_defconfig | 1 +
configs/at91sam9g20ek_nandflash_defconfig | 1 +
configs/at91sam9m10g45ek_mmc_defconfig | 1 +
configs/at91sam9m10g45ek_nandflash_defconfig | 1 +
configs/at91sam9n12ek_mmc_defconfig | 1 +
configs/at91sam9n12ek_nandflash_defconfig | 1 +
configs/at91sam9n12ek_spiflash_defconfig | 1 +
configs/at91sam9rlek_dataflash_defconfig | 1 +
configs/at91sam9rlek_nandflash_defconfig | 1 +
configs/at91sam9x5ek_dataflash_defconfig | 1 +
configs/at91sam9x5ek_mmc_defconfig | 1 +
configs/at91sam9x5ek_nandflash_defconfig | 1 +
configs/at91sam9x5ek_spiflash_defconfig | 1 +
configs/at91sam9xeek_dataflash_cs0_defconfig | 1 +
configs/at91sam9xeek_dataflash_cs1_defconfig | 1 +
configs/at91sam9xeek_nandflash_defconfig | 1 +
configs/axm_defconfig | 1 +
configs/corvus_defconfig | 1 +
configs/cpu9260_128M_defconfig | 1 +
configs/cpu9260_defconfig | 1 +
configs/cpu9260_nand_128M_defconfig | 1 +
configs/cpu9260_nand_defconfig | 1 +
configs/cpu9G20_128M_defconfig | 1 +
configs/cpu9G20_defconfig | 1 +
configs/cpu9G20_nand_128M_defconfig | 1 +
configs/cpu9G20_nand_defconfig | 1 +
configs/cpuat91_defconfig | 1 +
configs/cpuat91_ram_defconfig | 1 +
configs/eb_cpux9k2_defconfig | 1 +
configs/eb_cpux9k2_ram_defconfig | 1 +
configs/ethernut5_defconfig | 1 +
configs/meesc_dataflash_defconfig | 1 +
configs/meesc_defconfig | 1 +
configs/otc570_dataflash_defconfig | 1 +
configs/otc570_defconfig | 1 +
configs/pm9261_defconfig | 1 +
configs/pm9263_defconfig | 1 +
configs/pm9g45_defconfig | 1 +
configs/portuxg20_defconfig | 1 +
configs/sama5d3_xplained_mmc_defconfig | 1 +
configs/sama5d3_xplained_nandflash_defconfig | 1 +
configs/sama5d3xek_mmc_defconfig | 1 +
configs/sama5d3xek_nandflash_defconfig | 1 +
configs/sama5d3xek_spiflash_defconfig | 1 +
configs/sama5d4_xplained_mmc_defconfig | 1 +
configs/sama5d4_xplained_nandflash_defconfig | 1 +
configs/sama5d4_xplained_spiflash_defconfig | 1 +
configs/sama5d4ek_mmc_defconfig | 1 +
configs/sama5d4ek_nandflash_defconfig | 1 +
configs/sama5d4ek_spiflash_defconfig | 1 +
configs/sbc35_a9g20_eeprom_defconfig | 1 +
configs/sbc35_a9g20_nandflash_defconfig | 1 +
configs/snapper9260_defconfig | 1 +
configs/snapper9g20_defconfig | 1 +
configs/stamp9g20_defconfig | 1 +
configs/taurus_defconfig | 1 +
configs/tny_a9260_eeprom_defconfig | 1 +
configs/tny_a9260_nandflash_defconfig | 1 +
configs/tny_a9g20_eeprom_defconfig | 1 +
configs/tny_a9g20_nandflash_defconfig | 1 +
configs/usb_a9263_dataflash_defconfig | 1 +
configs/vl_ma2sc_defconfig | 1 +
configs/vl_ma2sc_ram_defconfig | 1 +
include/configs/km/km_arm.h | 2 +-
include/configs/sama5d3_xplained.h | 2 +-
include/configs/sama5d3xek.h | 2 +-
scripts/Makefile.autoconf | 19 ++-
368 files changed, 359 insertions(+), 424 deletions(-)
delete mode 100644 arch/arm/cpu/arm720t/tegra-common/Makefile
delete mode 100644 arch/arm/cpu/arm720t/tegra114/Makefile
delete mode 100644 arch/arm/cpu/arm720t/tegra124/Makefile
delete mode 100644 arch/arm/cpu/arm720t/tegra20/Makefile
delete mode 100644 arch/arm/cpu/arm720t/tegra30/Makefile
delete mode 100644 arch/arm/cpu/arm926ejs/at91/config.mk
delete mode 100644 arch/arm/cpu/armv7/at91/config.mk
delete mode 100644 arch/arm/cpu/armv7/tegra-common/Makefile
delete mode 100644 arch/arm/cpu/armv7/tegra20/Makefile
create mode 100644 arch/arm/mach-at91/Kconfig
rename arch/arm/{cpu/at91-common => mach-at91}/Makefile (58%)
rename arch/arm/{cpu/arm920t/at91 => mach-at91/arm920t}/Makefile (100%)
rename arch/arm/{cpu/arm920t/at91 => mach-at91/arm920t}/at91rm9200_devices.c (100%)
rename arch/arm/{cpu/arm920t/at91 => mach-at91/arm920t}/clock.c (100%)
rename arch/arm/{cpu/arm920t/at91 => mach-at91/arm920t}/cpu.c (100%)
rename arch/arm/{cpu/arm920t/at91 => mach-at91/arm920t}/lowlevel_init.S (100%)
rename arch/arm/{cpu/arm920t/at91 => mach-at91/arm920t}/reset.c (100%)
rename arch/arm/{cpu/arm920t/at91 => mach-at91/arm920t}/timer.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/Makefile (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/at91sam9260_devices.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/at91sam9261_devices.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/at91sam9263_devices.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/at91sam9m10g45_devices.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/at91sam9n12_devices.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/at91sam9rl_devices.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/at91sam9x5_devices.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/clock.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/cpu.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/eflash.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/led.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/lowlevel_init.S (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/reset.c (100%)
rename arch/arm/{cpu/arm926ejs/at91 => mach-at91/arm926ejs}/timer.c (100%)
rename arch/arm/{cpu/armv7/at91 => mach-at91/armv7}/Makefile (100%)
rename arch/arm/{cpu/armv7/at91 => mach-at91/armv7}/clock.c (100%)
rename arch/arm/{cpu/armv7/at91 => mach-at91/armv7}/cpu.c (100%)
rename arch/arm/{cpu/armv7/at91 => mach-at91/armv7}/reset.c (100%)
rename arch/arm/{cpu/armv7/at91 => mach-at91/armv7}/sama5d3_devices.c (100%)
rename arch/arm/{cpu/armv7/at91 => mach-at91/armv7}/sama5d4_devices.c (100%)
rename arch/arm/{cpu/armv7/at91 => mach-at91/armv7}/timer.c (100%)
create mode 100644 arch/arm/mach-at91/config.mk
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_common.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_dbu.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_eefc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_emac.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_gpbr.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_matrix.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_mc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_pdc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_pio.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_pit.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_pmc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_rstc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_rtt.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_spi.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_st.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_tc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91_wdt.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91rm9200.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9260.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9260_matrix.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9261.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9261_matrix.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9263.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9263_matrix.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9_matrix.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9_sdramc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9_smc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9g45.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9g45_matrix.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9rl.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9rl_matrix.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9x5.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/at91sam9x5_matrix.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/atmel_mpddrc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/atmel_serial.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/atmel_usba_udc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/clk.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/gpio.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/hardware.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/sama5d3.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/sama5d3_smc.h (100%)
rename arch/arm/{include/asm/arch-at91 => mach-at91/include/mach}/sama5d4.h (100%)
rename arch/arm/{cpu/at91-common => mach-at91}/mpddrc.c (100%)
rename arch/arm/{cpu/at91-common => mach-at91}/phy.c (100%)
rename arch/arm/{cpu/at91-common => mach-at91}/sdram.c (100%)
rename arch/arm/{cpu/at91-common => mach-at91}/spl.c (100%)
rename arch/arm/{cpu/at91-common => mach-at91}/spl_at91.c (100%)
rename arch/arm/{cpu/at91-common => mach-at91}/spl_atmel.c (100%)
rename arch/arm/{cpu/at91-common => mach-at91}/u-boot-spl.lds (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/Kconfig (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/Makefile (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/config.mk (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/cpu.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/da830_pinmux.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/da850_lowlevel.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/da850_pinmux.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/dm355.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/dm365.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/dm365_lowlevel.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/dm644x.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/dm646x.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/dp83848.c (98%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/et1011c.c (94%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/aintc_defs.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/da850_lowlevel.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/da8xx-usb.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/davinci_misc.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/ddr2_defs.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/dm365_lowlevel.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/emac_defs.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/gpio.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/hardware.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/i2c_defs.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/pinmux_defs.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/pll_defs.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/psc_defs.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/sdmmc_defs.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/syscfg_defs.h (100%)
rename arch/arm/{include/asm/arch-davinci => mach-davinci/include/mach}/timer_defs.h (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/ksz8873.c (95%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/lowlevel_init.S (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/lxt972.c (97%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/misc.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/pinmux.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/psc.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/reset.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/spl.c (100%)
rename arch/arm/{cpu/arm926ejs/davinci => mach-davinci}/timer.c (100%)
rename arch/arm/{cpu/armv7/highbank => mach-highbank}/Kconfig (100%)
rename arch/arm/{cpu/armv7/highbank => mach-highbank}/Makefile (100%)
rename arch/arm/{cpu/armv7/highbank => mach-highbank}/timer.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/Kconfig (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/Makefile (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/clock-k2e.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/clock-k2hk.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/clock-k2l.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/clock.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/cmd_clock.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/cmd_ddr3.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/cmd_mon.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/ddr3.c (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/clock-k2e.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/clock-k2hk.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/clock-k2l.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/clock.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/clock_defs.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/ddr3.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/hardware-k2e.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/hardware-k2hk.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/hardware-k2l.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/hardware.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/i2c_defs.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/mon.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/msmc.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/psc_defs.h (100%)
rename arch/arm/{include/asm/arch-keystone => mach-keystone/include/mach}/xhci-keystone.h (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/init.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/keystone.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/msmc.c (100%)
rename arch/arm/{cpu/armv7/keystone => mach-keystone}/psc.c (100%)
rename arch/arm/{cpu/arm926ejs/kirkwood => mach-kirkwood}/Kconfig (100%)
rename arch/arm/{cpu/arm926ejs/kirkwood => mach-kirkwood}/Makefile (100%)
rename arch/arm/{cpu/arm926ejs/kirkwood => mach-kirkwood}/cache.c (100%)
rename arch/arm/{cpu/arm926ejs/kirkwood => mach-kirkwood}/cpu.c (100%)
rename arch/arm/{include/asm/arch-kirkwood => mach-kirkwood/include/mach}/config.h (100%)
rename arch/arm/{include/asm/arch-kirkwood => mach-kirkwood/include/mach}/cpu.h (100%)
rename arch/arm/{include/asm/arch-kirkwood => mach-kirkwood/include/mach}/gpio.h (100%)
rename arch/arm/{include/asm/arch-kirkwood => mach-kirkwood/include/mach}/kw88f6192.h (100%)
rename arch/arm/{include/asm/arch-kirkwood => mach-kirkwood/include/mach}/kw88f6281.h (100%)
rename arch/arm/{include/asm/arch-kirkwood => mach-kirkwood/include/mach}/mpp.h (100%)
rename arch/arm/{include/asm/arch-kirkwood => mach-kirkwood/include/mach}/soc.h (100%)
rename arch/arm/{cpu/arm926ejs/kirkwood => mach-kirkwood}/mpp.c (100%)
rename arch/arm/{cpu/arm926ejs/nomadik => mach-nomadik}/Kconfig (100%)
rename arch/arm/{cpu/arm926ejs/nomadik => mach-nomadik}/Makefile (100%)
rename arch/arm/{cpu/arm926ejs/nomadik => mach-nomadik}/gpio.c (100%)
rename arch/arm/{include/asm/arch-nomadik => mach-nomadik/include/mach}/gpio.h (100%)
rename arch/arm/{include/asm/arch-nomadik => mach-nomadik/include/mach}/mtu.h (100%)
rename arch/arm/{cpu/arm926ejs/nomadik => mach-nomadik}/reset.S (100%)
rename arch/arm/{cpu/arm926ejs/nomadik => mach-nomadik}/timer.c (100%)
rename arch/arm/{cpu/arm926ejs/orion5x => mach-orion5x}/Kconfig (100%)
rename arch/arm/{cpu/arm926ejs/orion5x => mach-orion5x}/Makefile (100%)
rename arch/arm/{cpu/arm926ejs/orion5x => mach-orion5x}/cpu.c (100%)
rename arch/arm/{cpu/arm926ejs/orion5x => mach-orion5x}/dram.c (100%)
rename arch/arm/{include/asm/arch-orion5x => mach-orion5x/include/mach}/cpu.h (100%)
rename arch/arm/{include/asm/arch-orion5x => mach-orion5x/include/mach}/mv88f5182.h (100%)
rename arch/arm/{include/asm/arch-orion5x => mach-orion5x/include/mach}/orion5x.h (100%)
rename arch/arm/{cpu/arm926ejs/orion5x => mach-orion5x}/lowlevel_init.S (100%)
rename arch/arm/{cpu/arm926ejs/orion5x => mach-orion5x}/timer.c (100%)
rename arch/arm/{cpu/armv7/tegra-common => mach-tegra}/Kconfig (76%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/Makefile (61%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/ap.c (100%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/board.c (100%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/cache.c (100%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/clock.c (100%)
rename arch/arm/{cpu/armv7/tegra-common => mach-tegra}/cmd_enterrcm.c (100%)
rename arch/arm/{cpu/arm720t/tegra-common => mach-tegra}/cpu.c (100%)
rename arch/arm/{cpu/arm720t/tegra-common => mach-tegra}/cpu.h (100%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/lowlevel_init.S (100%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/pinmux-common.c (100%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/powergate.c (100%)
rename arch/arm/{cpu/arm720t/tegra-common => mach-tegra}/spl.c (100%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/sys_info.c (100%)
rename arch/arm/{cpu/armv7 => mach-tegra}/tegra114/Kconfig (100%)
rename arch/arm/{cpu/tegra114-common => mach-tegra/tegra114}/Makefile (89%)
rename arch/arm/{cpu/tegra114-common => mach-tegra/tegra114}/clock.c (100%)
rename arch/arm/{cpu/arm720t => mach-tegra}/tegra114/cpu.c (99%)
rename arch/arm/{cpu/tegra114-common => mach-tegra/tegra114}/funcmux.c (100%)
rename arch/arm/{cpu/tegra114-common => mach-tegra/tegra114}/pinmux.c (100%)
rename arch/arm/{cpu/armv7 => mach-tegra}/tegra124/Kconfig (100%)
rename arch/arm/{cpu/tegra124-common => mach-tegra/tegra124}/Makefile (84%)
rename arch/arm/{cpu/tegra124-common => mach-tegra/tegra124}/clock.c (100%)
rename arch/arm/{cpu/arm720t => mach-tegra}/tegra124/cpu.c (99%)
rename arch/arm/{cpu/tegra124-common => mach-tegra/tegra124}/funcmux.c (100%)
rename arch/arm/{cpu/tegra124-common => mach-tegra/tegra124}/pinmux.c (100%)
rename arch/arm/{cpu/tegra124-common => mach-tegra/tegra124}/xusb-padctl.c (100%)
rename arch/arm/{cpu/armv7 => mach-tegra}/tegra20/Kconfig (100%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/Makefile (77%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/clock.c (100%)
rename arch/arm/{cpu/arm720t => mach-tegra}/tegra20/cpu.c (98%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/crypto.c (100%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/crypto.h (100%)
rename arch/arm/{cpu/armv7 => mach-tegra}/tegra20/display.c (100%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/emc.c (100%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/funcmux.c (100%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/pinmux.c (100%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/pmu.c (100%)
rename arch/arm/{cpu/armv7 => mach-tegra}/tegra20/pwm.c (100%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/warmboot.c (100%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/warmboot_avp.c (100%)
rename arch/arm/{cpu/tegra20-common => mach-tegra/tegra20}/warmboot_avp.h (100%)
rename arch/arm/{cpu/armv7 => mach-tegra}/tegra30/Kconfig (100%)
rename arch/arm/{cpu/tegra30-common => mach-tegra/tegra30}/Makefile (89%)
rename arch/arm/{cpu/tegra30-common => mach-tegra/tegra30}/clock.c (100%)
rename arch/arm/{cpu/arm720t => mach-tegra}/tegra30/cpu.c (99%)
rename arch/arm/{cpu/tegra30-common => mach-tegra/tegra30}/funcmux.c (100%)
rename arch/arm/{cpu/tegra30-common => mach-tegra/tegra30}/pinmux.c (100%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/vpr.c (100%)
rename arch/arm/{cpu/tegra-common => mach-tegra}/xusb-padctl.c (100%)
rename arch/arm/{cpu/arm926ejs/versatile => mach-versatile}/Kconfig (100%)
rename arch/arm/{cpu/arm926ejs/versatile => mach-versatile}/Makefile (100%)
rename arch/arm/{cpu/arm926ejs/versatile => mach-versatile}/reset.S (100%)
rename arch/arm/{cpu/arm926ejs/versatile => mach-versatile}/timer.c (100%)
--
1.9.1
2
21

20 Feb '15
Masahiro Yamada (4):
ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value
malloc_f: fix broken .config caused by CONFIG_SYS_MALLOC_F
kconfig: switch to single .config configuration
kconfig: remove unneeded dependency on !SPL_BUILD
Kconfig | 27 +---
arch/arm/Kconfig | 7 +-
arch/arm/cpu/arm1176/bcm2835/Kconfig | 6 +-
arch/arm/cpu/armv7/exynos/Kconfig | 29 ++--
arch/arm/cpu/armv7/omap3/Kconfig | 11 +-
arch/arm/cpu/armv7/s5pc1xx/Kconfig | 4 +-
arch/arm/cpu/armv7/tegra-common/Kconfig | 18 ++-
arch/arm/cpu/armv7/uniphier/Kconfig | 5 -
arch/x86/Kconfig | 4 +-
board/amcc/canyonlands/Kconfig | 4 -
board/compulab/cm_t335/Kconfig | 6 +-
board/gumstix/pepper/Kconfig | 6 +-
board/isee/igep0033/Kconfig | 6 +-
board/phytec/pcm051/Kconfig | 6 +-
board/samsung/goni/Kconfig | 6 +-
board/samsung/smdkc100/Kconfig | 6 +-
board/silica/pengwyn/Kconfig | 6 +-
board/ti/am335x/Kconfig | 11 +-
common/Kconfig | 1 -
config.mk | 5 +
configs/ph1_ld4_defconfig | 2 +-
configs/ph1_pro4_defconfig | 2 +-
configs/ph1_sld8_defconfig | 2 +-
doc/README.kconfig | 128 ++++------------
drivers/core/Kconfig | 16 +-
drivers/mtd/nand/Kconfig | 6 +-
dts/Kconfig | 1 -
include/config_uncmd_spl.h | 13 ++
scripts/Makefile.autoconf | 36 +++--
scripts/Makefile.build | 3 +-
scripts/Makefile.spl | 10 +-
scripts/Makefile.uncmd_spl | 18 +++
scripts/multiconfig.sh | 261 +-------------------------------
33 files changed, 182 insertions(+), 490 deletions(-)
create mode 100644 scripts/Makefile.uncmd_spl
--
1.9.1
5
13

19 Feb '15
Hello!
I recently got Renesas SH7785LCR board which I am currently setting up
as a Debian porterbox for sh4. Currently, all sh4 build machines at
Debian for sh4 are running kernel 3.2.0 which is showing its age now,
especially since newer versions of udev are complaining about the
deprecated kernel.
Since I am setting up my SH7785LCR board as a new machine, I wanted to
start with a new kernel right away. But since I also don't have any
older base system which I could use, I need to use an updated kernel
anyway.
While I had no problems booting an old uImage with the aforementioned
3.2.0 kernel, I haven't had any success with kernel 3.18 so far. u-boot
loads the kernel, decompresses it but seems to perform a reset right
away:
U-Boot 2014.01 (Jan 30 2015 - 11:01:14)
CPU: SH4
BOARD: Renesas Technology Corp. R0P7785LC0011RL
DRAM: 384MB
Flash: 64MB
PCI: SH7780 PCI host bridge found.
PCI: Bus Dev VenId DevId Class Int
00:00.0 - 10ec:8169 - Network controller
00:01.0 - 1095:3512 - Mass storage controller
In: serial
Out: serial
Err: serial
Net: RTL8169#0
=>
=> usb reset
(Re)start USB...
USB0: scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
=> fatload usb 0:1 0x89000000 uImage-3.18
reading uImage-3.18
2977932 bytes read in 1690 ms (1.7 MiB/s)
=> pmb
=> bootm
## Booting kernel from Legacy Image at 89000000 ...
Image Name:
Image Type: SuperH Linux Kernel Image (gzip compressed)
Data Size: 2977868 Bytes = 2.8 MiB
Load Address: 80001000
Entry Point: 80002000
Verifying Checksum ... OK
� Uncompressing Kernel Image ... OK
U-Boot 2014.01 (Jan 30 2015 - 11:01:14)
CPU: SH4
BOARD: Renesas Technology Corp. R0P7785LC0011RL
DRAM: 384MB
Flash: 64MB
PCI: SH7780 PCI host bridge found.
PCI: Bus Dev VenId DevId Class Int
00:00.0 - 10ec:8169 - Network controller
00:01.0 - 1095:3512 - Mass storage controller
In: serial
Out: serial
Err: serial
Net: RTL8169#0
=>
The 3.18 uImage was created by downloading the Debian kernel image
package for the SH7785LCR [1] and unpacking the package. Then I
created the uImage using the following command using the same loader
and entry address that are being set for the 3.2.0 uImage:
mkimage -A sh -O linux -a 0x80001000 -e 0x80002000 -d
vmlinuz-3.18.0-trunk-sh7785lcr.gz uImage-3.18
Does anyone know what could be wrong such that the kernel wouldn't
boot as shown above?
Cheers,
Adrian
> [1]
ftp://ftp.debian-ports.org/debian/pool-sh4/main/l/linux/linux-image-3.18.0-…
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz(a)debian.org
`. `' Freie Universitaet Berlin - glaubitz(a)physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
1
0

19 Feb '15
Hello!
I recently got Renesas SH7785LCR board which I am currently setting up
as a Debian porterbox for sh4. Currently, all sh4 build machines at
Debian for sh4 are running kernel 3.2.0 which is showing its age now,
especially since newer versions of udev are complaining about the
deprecated kernel.
Since I am setting up my SH7785LCR board as a new machine, I wanted to
start with a new kernel right away. But since I also don't have any
older base system which I could use, I need to use an updated kernel
anyway.
While I had no problems booting an old uImage with the aforementioned
3.2.0 kernel, I haven't had any success with kernel 3.18 so far. u-boot
loads the kernel, decompresses it but seems to perform a reset right
away:
U-Boot 2014.01 (Jan 30 2015 - 11:01:14)
CPU: SH4
BOARD: Renesas Technology Corp. R0P7785LC0011RL
DRAM: 384MB
Flash: 64MB
PCI: SH7780 PCI host bridge found.
PCI: Bus Dev VenId DevId Class Int
00:00.0 - 10ec:8169 - Network controller
00:01.0 - 1095:3512 - Mass storage controller
In: serial
Out: serial
Err: serial
Net: RTL8169#0
=>
=> usb reset
(Re)start USB...
USB0: scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
=> fatload usb 0:1 0x89000000 uImage-3.18
reading uImage-3.18
2977932 bytes read in 1690 ms (1.7 MiB/s)
=> pmb
=> bootm
## Booting kernel from Legacy Image at 89000000 ...
Image Name:
Image Type: SuperH Linux Kernel Image (gzip compressed)
Data Size: 2977868 Bytes = 2.8 MiB
Load Address: 80001000
Entry Point: 80002000
Verifying Checksum ... OK
� Uncompressing Kernel Image ... OK
U-Boot 2014.01 (Jan 30 2015 - 11:01:14)
CPU: SH4
BOARD: Renesas Technology Corp. R0P7785LC0011RL
DRAM: 384MB
Flash: 64MB
PCI: SH7780 PCI host bridge found.
PCI: Bus Dev VenId DevId Class Int
00:00.0 - 10ec:8169 - Network controller
00:01.0 - 1095:3512 - Mass storage controller
In: serial
Out: serial
Err: serial
Net: RTL8169#0
=>
The 3.18 uImage was created by downloading the Debian kernel image
package for the SH7785LCR [1] and unpacking the package. Then I
created the uImage using the following command using the same loader
and entry address that are being set for the 3.2.0 uImage:
mkimage -A sh -O linux -a 0x80001000 -e 0x80002000 -d
vmlinuz-3.18.0-trunk-sh7785lcr.gz uImage-3.18
Does anyone know what could be wrong such that the kernel wouldn't
boot as shown above?
Cheers,
Adrian
> [1]
ftp://ftp.debian-ports.org/debian/pool-sh4/main/l/linux/linux-image-3.18.0-…
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz(a)debian.org
`. `' Freie Universitaet Berlin - glaubitz(a)physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
1
0
Make fastboot work in high-speed mode by specifying separate sets
of usb_descriptor_headers for full-speed and high-speed.
Tested on s5p_ds5.
Signed-off-by: Matt Reimer <mreimer(a)sdgsystems.com>
---
drivers/usb/gadget/f_fastboot.c | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 310175a..024ef20 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -74,6 +74,15 @@ static struct usb_endpoint_descriptor fs_ep_out = {
.bInterval = 0x00,
};
+static struct usb_endpoint_descriptor hs_ep_in = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = RX_ENDPOINT_MAXIMUM_PACKET_SIZE_2_0,
+ .bInterval = 0x00,
+};
+
static struct usb_endpoint_descriptor hs_ep_out = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
@@ -94,9 +103,16 @@ static struct usb_interface_descriptor interface_desc = {
.bInterfaceProtocol = FASTBOOT_INTERFACE_PROTOCOL,
};
-static struct usb_descriptor_header *fb_runtime_descs[] = {
+static struct usb_descriptor_header *fb_fs_runtime_descs[] = {
(struct usb_descriptor_header *)&interface_desc,
(struct usb_descriptor_header *)&fs_ep_in,
+ (struct usb_descriptor_header *)&fs_ep_out,
+ NULL,
+};
+
+static struct usb_descriptor_header *fb_hs_runtime_descs[] = {
+ (struct usb_descriptor_header *)&interface_desc,
+ (struct usb_descriptor_header *)&hs_ep_in,
(struct usb_descriptor_header *)&hs_ep_out,
NULL,
};
@@ -160,6 +176,7 @@ static int fastboot_bind(struct usb_configuration *c, struct usb_function *f)
f_fb->out_ep->driver_data = c->cdev;
hs_ep_out.bEndpointAddress = fs_ep_out.bEndpointAddress;
+ hs_ep_in.bEndpointAddress = fs_ep_in.bEndpointAddress;
return 0;
}
@@ -236,7 +253,10 @@ static int fastboot_set_alt(struct usb_function *f,
}
f_fb->out_req->complete = rx_handler_command;
- ret = usb_ep_enable(f_fb->in_ep, &fs_ep_in);
+ if (gadget->speed == USB_SPEED_HIGH)
+ ret = usb_ep_enable(f_fb->in_ep, &hs_ep_in);
+ else
+ ret = usb_ep_enable(f_fb->in_ep, &fs_ep_in);
if (ret) {
puts("failed to enable in ep\n");
goto err;
@@ -277,7 +297,8 @@ static int fastboot_add(struct usb_configuration *c)
}
f_fb->usb_function.name = "f_fastboot";
- f_fb->usb_function.hs_descriptors = fb_runtime_descs;
+ f_fb->usb_function.descriptors = fb_fs_runtime_descs;
+ f_fb->usb_function.hs_descriptors = fb_hs_runtime_descs;
f_fb->usb_function.bind = fastboot_bind;
f_fb->usb_function.unbind = fastboot_unbind;
f_fb->usb_function.set_alt = fastboot_set_alt;
--
1.7.9.5
3
2

[U-Boot] [PATCH] use ASM_NL instead of '; ' for assembler new line character in the macro
by Alexey Brodkin 19 Feb '15
by Alexey Brodkin 19 Feb '15
19 Feb '15
From: Chen Gang <gang.chen.5i5j(a)gmail.com>
For some assemblers, they use another character as newline in a macro
(e.g. arc uses '`'), so for generic assembly code, need use ASM_NL (a
macro) instead of ';' for it.
Basically this is the same patch as applied to Linux kernel -
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/inclu…
but modified a bit to fit in U-Boot.
Signed-off-by: Chen Gang <gang.chen.5i5j(a)gmail.com>
Signed-off-by: Alexey Brodkin <abrodkin(a)synopsys.com>
Cc: Masahiro Yamada <yamada.m(a)jp.panasonic.com>
Cc: Simon Glass <sjg(a)chromium.org>
Cc: Tom Rini <trini(a)ti.com>
---
arch/arc/include/asm/linkage.h | 12 ++++++++++++
include/linux/linkage.h | 13 +++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 arch/arc/include/asm/linkage.h
diff --git a/arch/arc/include/asm/linkage.h b/arch/arc/include/asm/linkage.h
new file mode 100644
index 0000000..2d1a603
--- /dev/null
+++ b/arch/arc/include/asm/linkage.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2004, 2007-2010, 2011-2015 Synopsys, Inc. All rights reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __ASM_ARC_LINKAGE_H
+#define __ASM_ARC_LINKAGE_H
+
+#define ASM_NL ` /* use '`' to mark new line in macro */
+
+#endif /* __ASM_ARC_LINKAGE_H */
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 5797498..efb04ee 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -11,6 +11,11 @@
#include <asm/linkage.h>
+/* Some toolchains use other characters (e.g. '`') to mark new line in macro */
+#ifndef ASM_NL
+#define ASM_NL ;
+#endif
+
#ifdef __cplusplus
#define CPP_ASMLINKAGE extern "C"
#else
@@ -43,15 +48,15 @@
#define ALIGN_STR __ALIGN_STR
#define LENTRY(name) \
- ALIGN; \
+ ALIGN ASM_NL \
SYMBOL_NAME_LABEL(name)
#define ENTRY(name) \
- .globl SYMBOL_NAME(name); \
+ .globl SYMBOL_NAME(name) ASM_NL \
LENTRY(name)
#define WEAK(name) \
- .weak SYMBOL_NAME(name); \
+ .weak SYMBOL_NAME(name) ASM_NL \
LENTRY(name)
#ifndef END
@@ -61,7 +66,7 @@
#ifndef ENDPROC
#define ENDPROC(name) \
- .type name STT_FUNC; \
+ .type name STT_FUNC ASM_NL \
END(name)
#endif
--
2.1.0
1
0

19 Feb '15
This series converts most boards to use Kconfig for driver model. It is
based on the v1 patches but split out so that only one arch is done per
patch. This makes it easier to review and test. Also since DM SPL
support is not fully merged some adjustments have had to be made to
allow this series to work independent of that (since I don't want to
delay the Kconfig conversion any longer).
About 10 boards remain to be cleaned up and these are dealt with
in a small follow-on series.
Changes in v2:
- Add CONFIG_SYS_MALLOC_F as well as CONFIG_SYS_MALLOC_F_LEN
- Add a patch to squash use of 'struct i2c_msg' in drivers
- Drop SPL-specific #ifdef in config_defaults.h since Kconfig will do this
- Fix 'procides' typo
- Move subsystem Kconfigs out of drivers/core
- Split out patch to add CMD_DM and CMD_DEMO to Kconfig
- Split out patch to add Kconfig for driver/demo
- Split out patch to add Kconfig options for driver model SPL support
- Split out patch to add a Kconfig file for test/
- Split out patch to expand/complete Kconfig in drivers/
- Use a dm_ prefix for remaining conflicting I2C functions
Simon Glass (19):
dm: i2c: Add a dm_ prefix to driver model bus speed functions
dm: i2c: Make API accessible even without CONFIG_DM
dm: Add Kconfig for driver/demo
dm: Expand and complete Kconfig in drivers/
dm: Add Kconfig options for driver model SPL support
dm: test: Add a Kconfig file
dm: Add CMD_DM and CMD_DEMO to Kconfig
dm: Move Raspberry Pi driver model CONFIGs to Kconfig
dm: exynos: Move driver model CONFIGs to Kconfig
dm: x86: Move driver model CONFIGs to Kconfig
dm: tegra: Move driver model CONFIGs to Kconfig
dm: at91: snapper: Move driver model CONFIGs to Kconfig
dm: omap3: Move driver model CONFIGs to Kconfig
dm: sandbox: Move driver model CONFIGs to Kconfig
dm: sunxi: Move driver model CONFIGs to Kconfig
dm: mx6: Move driver model CONFIGs to Kconfig
dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig
dm: socfpga: Move driver model CONFIGs to Kconfig
dm: Drop unused driver model config_defaults
Kconfig | 21 +++++++++++++
arch/arm/Kconfig | 2 ++
arch/arm/cpu/arm1176/bcm2835/Kconfig | 12 ++++++++
arch/arm/cpu/armv7/exynos/Kconfig | 21 +++++++++++++
arch/arm/cpu/armv7/omap3/Kconfig | 15 ++++++++++
arch/arm/cpu/armv7/tegra-common/Kconfig | 24 +++++++++++++++
arch/arm/cpu/armv7/uniphier/Kconfig | 6 ++++
arch/arm/include/asm/arch-at91/at91_pio.h | 12 +++-----
arch/sandbox/Kconfig | 24 +++++++++++++++
arch/x86/Kconfig | 15 ++++++++++
board/compulab/cm_t335/Kconfig | 9 ++++++
board/gumstix/pepper/Kconfig | 9 ++++++
board/isee/igep0033/Kconfig | 9 ++++++
board/phytec/pcm051/Kconfig | 9 ++++++
board/samsung/goni/Kconfig | 9 ++++++
board/samsung/smdk5420/Kconfig | 6 ++++
board/samsung/smdkc100/Kconfig | 9 ++++++
board/silica/pengwyn/Kconfig | 9 ++++++
board/ti/am335x/Kconfig | 16 ++++++++++
common/Kconfig | 23 ++++++++++++++
common/cmd_i2c.c | 4 +--
configs/Linksprite_pcDuino3_fdt_defconfig | 4 +++
configs/am335x_igep0033_defconfig | 2 ++
configs/am3517_crane_defconfig | 3 ++
configs/am3517_evm_defconfig | 3 ++
configs/cm_fx6_defconfig | 5 ++++
configs/cm_t335_defconfig | 2 ++
configs/cm_t3517_defconfig | 3 ++
configs/cm_t35_defconfig | 3 ++
configs/devkit8000_defconfig | 3 ++
configs/dig297_defconfig | 3 ++
configs/eco5pk_defconfig | 3 ++
configs/gwventana_defconfig | 2 ++
configs/mcx_defconfig | 3 ++
configs/mt_ventoux_defconfig | 3 ++
configs/mx6dlsabreauto_defconfig | 2 ++
configs/mx6qsabreauto_defconfig | 2 ++
configs/mx6qsabresd_defconfig | 2 ++
configs/mx6sxsabresd_defconfig | 2 ++
configs/nokia_rx51_defconfig | 5 ++++
configs/omap3_beagle_defconfig | 3 ++
configs/omap3_evm_defconfig | 3 ++
configs/omap3_evm_quick_mmc_defconfig | 3 ++
configs/omap3_evm_quick_nand_defconfig | 3 ++
configs/omap3_ha_defconfig | 3 ++
configs/omap3_logic_defconfig | 3 ++
configs/omap3_mvblx_defconfig | 3 ++
configs/omap3_pandora_defconfig | 3 ++
configs/omap3_sdp3430_defconfig | 3 ++
configs/pcm051_rev1_defconfig | 2 ++
configs/pcm051_rev3_defconfig | 2 ++
configs/pengwyn_defconfig | 2 ++
configs/pepper_defconfig | 2 ++
configs/rpi_defconfig | 2 ++
configs/s5p_goni_defconfig | 2 ++
configs/sandbox_defconfig | 2 ++
configs/smdkc100_defconfig | 2 ++
configs/snapper9260_defconfig | 5 ++++
configs/snapper9g20_defconfig | 5 ++++
configs/socfpga_socrates_defconfig | 3 ++
configs/stv0991_defconfig | 2 ++
configs/tao3530_defconfig | 3 ++
configs/tricorder_defconfig | 3 ++
configs/tricorder_flash_defconfig | 3 ++
configs/twister_defconfig | 3 ++
doc/driver-model/spi-howto.txt | 4 +--
drivers/Kconfig | 4 +++
drivers/core/Kconfig | 50 +++++++++++++++++++++++++++++--
drivers/demo/Kconfig | 26 ++++++++++++++++
drivers/gpio/Kconfig | 7 +++--
drivers/i2c/Kconfig | 12 ++++++--
drivers/i2c/adi_i2c.c | 6 ++--
drivers/i2c/i2c-uclass.c | 11 ++-----
drivers/i2c/kona_i2c.c | 16 +++++-----
drivers/i2c/mv_i2c.c | 10 +++----
drivers/misc/Kconfig | 9 ++++++
drivers/mtd/Kconfig | 2 ++
drivers/mtd/spi/Kconfig | 14 +++++++++
drivers/serial/Kconfig | 6 ++--
drivers/spi/Kconfig | 10 +++++--
drivers/thermal/Kconfig | 7 +++++
include/config_defaults.h | 6 ----
include/configs/cm_fx6.h | 7 -----
include/configs/exynos-common.h | 7 -----
include/configs/gw_ventana.h | 1 -
include/configs/mx6sabre_common.h | 1 -
include/configs/mx6sxsabresd.h | 1 -
include/configs/novena.h | 1 -
include/configs/peach-pi.h | 1 -
include/configs/peach-pit.h | 1 -
include/configs/rpi.h | 7 -----
include/configs/s5p_goni.h | 5 ----
include/configs/sandbox.h | 13 --------
include/configs/smdkc100.h | 7 -----
include/configs/snapper9260.h | 5 ----
include/configs/socfpga_common.h | 7 -----
include/configs/stv0991.h | 1 -
include/configs/sunxi-common.h | 4 ---
include/configs/tegra-common.h | 11 -------
include/configs/ti_am335x_common.h | 7 -----
include/configs/ti_omap3_common.h | 5 ----
include/configs/uniphier.h | 4 ---
include/configs/x86-common.h | 6 ----
include/i2c.h | 13 ++++----
test/Kconfig | 1 +
test/dm/Kconfig | 8 +++++
test/dm/i2c.c | 6 ++--
107 files changed, 554 insertions(+), 165 deletions(-)
create mode 100644 arch/arm/cpu/arm1176/bcm2835/Kconfig
create mode 100644 drivers/demo/Kconfig
create mode 100644 drivers/mtd/spi/Kconfig
create mode 100644 drivers/thermal/Kconfig
create mode 100644 test/Kconfig
create mode 100644 test/dm/Kconfig
--
2.2.0.rc0.207.ga3a616c
8
54
PSCI is an ARM standard that provides a generic interface that
supervisory software can use to manage power in the following
situations:
- Core idle management
- CPU hotplug
- big.LITTLE migration models
- System shutdown and reset
It basically allows the kernel to offload these tasks to the firmware,
and rely on common kernel side code.
More importantly, it gives a way to ensure that CPUs enter the kernel
at the appropriate exception level (ie HYP mode, to allow the use of
the virtualization extensions), even across events like CPUs being
powered off/on or suspended.
The main idea here is to turn some of the existing u-boot code into a
separate section that can live in secure RAM (or a reserved page of
memory), containing a secure monitor that will implement the PSCI
operations. This code will still be alive when u-boot is long gone,
hence the need for a piece of memory that will not be touched by the
OS.
This patch series contains 4 parts:
- the first four patches are just bug fixes
- the next two refactor the HYP/non-secure code to allow relocation
in secure memory
- the next four contain the generic PSCI code and DT infrastructure
- the last three implement the CPU_ON method of the Allwinner A20 (aka sun7i).
I realize the A20 u-boot code is not upstream yet (BTW is anyone
actively working on that?), but hopefully that should give a good idea
of how things are structured so far. The patches are against the
mainline u-boot tree as of today, merged with the sunxi u-boot tree
of the day and the first 10 patches will directly apply to mainline
u-boot.
As for using this code, it goes like this:
sun7i# ext2load mmc 0:1 0x40008000 zImage ; ext2load mmc 0:1 0x60000000 sun7i-a20-cubietruck.dtb
2270120 bytes read in 117 ms (18.5 MiB/s)
9138 bytes read in 3 ms (2.9 MiB/s)
sun7i# fdt addr 0x60000000 ; fdt resize ; fdt set ethernet0 mac-address "[5a fe b0 07 b0 07]"
sun7i# setenv bootargs console=ttyS0,115200 earlyprintk ip=dhcp root=/dev/nfs nfsroot=/backup/a20_root,tcp
sun7i# bootz 0x40008000 - 0x60000000
The kernel now boots in HYP mode, finds its secondary CPU without any
SMP code present in the kernel, and runs KVM out of the box.
I've been told the Xen/ARM guys managed to do the same fairly easily.
This code has also been tested on a VExpress TC2, running KVM with all
5 CPUs, in order to make sure there was no obvious regression.
I'm wildly cross-posting this patch series, including to lists I'm not
subscribed to. Please keep me on Cc for any comment you may have.
The code is also available at:
git://git.kernel.org/pub/scm/linux/kernel/git/maz/u-boot.git wip/psci
Cheers,
M.
Ma Haijun (1):
ARM: convert arch_fixup_memory_node to a generic FDT fixup function
Marc Zyngier (12):
ARM: HYP/non-sec: move switch to non-sec to the last boot phase
ARM: HYP/non-sec: add a barrier after setting SCR.NS==1
ARM: non-sec: reset CNTVOFF to zero
ARM: add missing HYP mode constant
ARM: HYP/non-sec: add separate section for secure code
ARM: HYP/non-sec: allow relocation to secure RAM
ARM: HYP/non-sec: add generic ARMv7 PSCI code
ARM: HYP/non-sec: add the option for a second-stage monitor
ARM: HYP/non-sec/PSCI: emit DT nodes
sunxi: fix SRAM_B/SRAM_D memory map
sunxi: HYP/non-sec: add sun7i PSCI backend
sunxi: HYP/non-sec: configure CNTFRQ on all CPUs
arch/arm/config.mk | 2 +-
arch/arm/cpu/armv7/Makefile | 5 +
arch/arm/cpu/armv7/nonsec_virt.S | 168 +++++++++++++++++---------------
arch/arm/cpu/armv7/psci.S | 105 ++++++++++++++++++++
arch/arm/cpu/armv7/sunxi/Makefile | 3 +
arch/arm/cpu/armv7/sunxi/psci.S | 162 ++++++++++++++++++++++++++++++
arch/arm/cpu/armv7/virt-dt.c | 100 +++++++++++++++++++
arch/arm/cpu/armv7/virt-v7.c | 59 ++++-------
arch/arm/cpu/u-boot.lds | 30 ++++++
arch/arm/include/asm/arch-sunxi/cpu.h | 4 +-
arch/arm/include/asm/armv7.h | 11 ++-
arch/arm/include/asm/proc-armv/ptrace.h | 2 +
arch/arm/include/asm/psci.h | 35 +++++++
arch/arm/include/asm/secure.h | 26 +++++
arch/arm/lib/bootm-fdt.c | 13 ++-
arch/arm/lib/bootm.c | 27 +++--
arch/arm/lib/interrupts.c | 2 +-
arch/arm/lib/sections.c | 2 +
common/image-fdt.c | 7 +-
include/common.h | 6 +-
include/configs/sun7i.h | 7 ++
21 files changed, 627 insertions(+), 149 deletions(-)
create mode 100644 arch/arm/cpu/armv7/psci.S
create mode 100644 arch/arm/cpu/armv7/sunxi/psci.S
create mode 100644 arch/arm/cpu/armv7/virt-dt.c
create mode 100644 arch/arm/include/asm/psci.h
create mode 100644 arch/arm/include/asm/secure.h
--
1.8.5.1
7
35

[U-Boot] [PATCH][v5] crypto/fsl - Add progressive hashing support using hardware acceleration.
by Gaurav Rana 19 Feb '15
by Gaurav Rana 19 Feb '15
19 Feb '15
Currently only normal hashing is supported using hardware acceleration.
Added support for progressive hashing using hardware.
Signed-off-by: Ruchika Gupta <ruchika.gupta(a)freescale.com>
Signed-off-by: Gaurav Rana <gaurav.rana(a)freescale.com>
CC: Simon Glass <sjg(a)chromium.org>
---
Changes in v5:
Modify description for CONFIG_SHA256, CONFIG_SHA256.
Changes in v4:
Add CONFIG_SHA256, CONFIG_SHA256, CONFIG_SHA_PROG_HW_ACCEL, CONFIG_SHA_HW_ACCEL to Kconfig.
Modify README for these configs descriptions.
Changes in v3:
Remove duplication of code and create function gen_hash_type.
Modify MAX_SG to MAX_SG_32
Changes in v2:
Merge to common functions for SHA1 and SHA256.
Replace malloc and memset with calloc.
Remove cast conversions for void* pointers.
Replace hardcoded errors with Macros.
Corrected comments.
Kconfig | 4 +-
README | 23 +++++--
common/hash.c | 10 +++
drivers/crypto/fsl/fsl_hash.c | 138 +++++++++++++++++++++++++++++++++++++++++-
drivers/crypto/fsl/fsl_hash.h | 34 +++++++++++
include/fsl_sec.h | 26 ++++++++
include/hw_sha.h | 41 ++++++++++++-
lib/Kconfig | 38 ++++++++++++
8 files changed, 307 insertions(+), 7 deletions(-)
create mode 100644 drivers/crypto/fsl/fsl_hash.h
diff --git a/Kconfig b/Kconfig
index fed488f..c4afb82 100644
--- a/Kconfig
+++ b/Kconfig
@@ -121,7 +121,9 @@ config FIT_SIGNATURE
select RSA
help
This option enables signature verification of FIT uImages,
- using a hash signed and verified using RSA.
+ using a hash signed and verified using RSA. If
+ CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive
+ hashing is available using hardware, RSA library will be using it.
See doc/uImage.FIT/signature.txt for more details.
config SYS_EXTRA_OPTIONS
diff --git a/README b/README
index cac7978..7a3f1e7 100644
--- a/README
+++ b/README
@@ -3149,8 +3149,21 @@ CBFS (Coreboot Filesystem) support
Enable the hash verify command (hash -v). This adds to code
size a little.
- CONFIG_SHA1 - support SHA1 hashing
- CONFIG_SHA256 - support SHA256 hashing
+ CONFIG_SHA1 - This option enables support of hashing using SHA1
+ algorithm. The hash is calculated in software.
+ CONFIG_SHA256 - This option enables support of hashing using
+ SHA256 algorithm. The hash is calculated in software.
+ CONFIG_SHA_HW_ACCEL - This option enables calculation of hash
+ using SHA1/SHA256 algorithm in hardware. The files using
+ hash_lookup_algo function would get pointer to structure having
+ hardware accelerated SHA support. The hash command would
+ automatically use hardware support if this option is enabled.
+ CONFIG_SHA_PROG_HW_ACCEL - This option enables SHA1 or SHA256
+ progressive hashing using hardware acceleration. The
+ hash_progressive_lookup_algo function would return pointer to
+ structure having support for progressive hashing in hardware.
+ FIT_SIGNATURE which uses this function would automatically
+ use hardware support if this option is enabled.
Note: There is also a sha1sum command, which should perhaps
be deprecated in favour of 'hash sha1'.
@@ -3444,8 +3457,10 @@ FIT uImage format:
CONFIG_FIT_SIGNATURE
This option enables signature verification of FIT uImages,
- using a hash signed and verified using RSA. See
- doc/uImage.FIT/signature.txt for more details.
+ using a hash signed and verified using RSA. If
+ CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive
+ hashing is available using hardware, RSA library will be using it.
+ See doc/uImage.FIT/signature.txt for more details.
WARNING: When relying on signed FIT images with required
signature check the legacy image format is default
diff --git a/common/hash.c b/common/hash.c
index d154d02..9e9f84b 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -127,11 +127,21 @@ static struct hash_algo hash_algo[] = {
SHA1_SUM_LEN,
hw_sha1,
CHUNKSZ_SHA1,
+#ifdef CONFIG_SHA_PROG_HW_ACCEL
+ hw_sha_init,
+ hw_sha_update,
+ hw_sha_finish,
+#endif
}, {
"sha256",
SHA256_SUM_LEN,
hw_sha256,
CHUNKSZ_SHA256,
+#ifdef CONFIG_SHA_PROG_HW_ACCEL
+ hw_sha_init,
+ hw_sha_update,
+ hw_sha_finish,
+#endif
},
#endif
#ifdef CONFIG_SHA1
diff --git a/drivers/crypto/fsl/fsl_hash.c b/drivers/crypto/fsl/fsl_hash.c
index d77f257..c298404 100644
--- a/drivers/crypto/fsl/fsl_hash.c
+++ b/drivers/crypto/fsl/fsl_hash.c
@@ -10,6 +10,9 @@
#include "jobdesc.h"
#include "desc.h"
#include "jr.h"
+#include "fsl_hash.h"
+#include <hw_sha.h>
+#include <asm-generic/errno.h>
#define CRYPTO_MAX_ALG_NAME 80
#define SHA1_DIGEST_SIZE 20
@@ -39,6 +42,122 @@ static struct caam_hash_template driver_hash[] = {
},
};
+static enum caam_hash_algos get_hash_type(struct hash_algo *algo)
+{
+ if (!strcmp(algo->name, driver_hash[SHA1].name))
+ return SHA1;
+ else
+ return SHA256;
+}
+
+/* Create the context for progressive hashing using h/w acceleration.
+ *
+ * @ctxp: Pointer to the pointer of the context for hashing
+ * @caam_algo: Enum for SHA1 or SHA256
+ * @return 0 if ok, -ENOMEM on error
+ */
+static int caam_hash_init(void **ctxp, enum caam_hash_algos caam_algo)
+{
+ *ctxp = calloc(1, sizeof(struct sha_ctx));
+ if (*ctxp == NULL) {
+ debug("Cannot allocate memory for context\n");
+ return -ENOMEM;
+ }
+ return 0;
+}
+
+/*
+ * Update sg table for progressive hashing using h/w acceleration
+ *
+ * The context is freed by this function if an error occurs.
+ * We support at most 32 Scatter/Gather Entries.
+ *
+ * @hash_ctx: Pointer to the context for hashing
+ * @buf: Pointer to the buffer being hashed
+ * @size: Size of the buffer being hashed
+ * @is_last: 1 if this is the last update; 0 otherwise
+ * @caam_algo: Enum for SHA1 or SHA256
+ * @return 0 if ok, -EINVAL on error
+ */
+static int caam_hash_update(void *hash_ctx, const void *buf,
+ unsigned int size, int is_last,
+ enum caam_hash_algos caam_algo)
+{
+ uint32_t final = 0;
+ dma_addr_t addr = virt_to_phys((void *)buf);
+ struct sha_ctx *ctx = hash_ctx;
+
+ if (ctx->sg_num >= MAX_SG_32) {
+ free(ctx);
+ return -EINVAL;
+ }
+
+#ifdef CONFIG_PHYS_64BIT
+ ctx->sg_tbl[ctx->sg_num].addr_hi = addr >> 32;
+#else
+ ctx->sg_tbl[ctx->sg_num].addr_hi = 0x0;
+#endif
+ ctx->sg_tbl[ctx->sg_num].addr_lo = addr;
+
+ sec_out32(&ctx->sg_tbl[ctx->sg_num].len_flag,
+ (size & SG_ENTRY_LENGTH_MASK));
+
+ ctx->sg_num++;
+
+ if (is_last) {
+ final = sec_in32(&ctx->sg_tbl[ctx->sg_num - 1].len_flag) |
+ SG_ENTRY_FINAL_BIT;
+ sec_out32(&ctx->sg_tbl[ctx->sg_num - 1].len_flag, final);
+ }
+
+ return 0;
+}
+
+/*
+ * Perform progressive hashing on the given buffer and copy hash at
+ * destination buffer
+ *
+ * The context is freed after completion of hash operation.
+ *
+ * @hash_ctx: Pointer to the context for hashing
+ * @dest_buf: Pointer to the destination buffer where hash is to be copied
+ * @size: Size of the buffer being hashed
+ * @caam_algo: Enum for SHA1 or SHA256
+ * @return 0 if ok, -EINVAL on error
+ */
+static int caam_hash_finish(void *hash_ctx, void *dest_buf,
+ int size, enum caam_hash_algos caam_algo)
+{
+ uint32_t len = 0;
+ struct sha_ctx *ctx = hash_ctx;
+ int i = 0, ret = 0;
+
+ if (size < driver_hash[caam_algo].digestsize) {
+ free(ctx);
+ return -EINVAL;
+ }
+
+ for (i = 0; i < ctx->sg_num; i++)
+ len += (sec_in32(&ctx->sg_tbl[i].len_flag) &
+ SG_ENTRY_LENGTH_MASK);
+
+ inline_cnstr_jobdesc_hash(ctx->sha_desc, (uint8_t *)ctx->sg_tbl, len,
+ ctx->hash,
+ driver_hash[caam_algo].alg_type,
+ driver_hash[caam_algo].digestsize,
+ 1);
+
+ ret = run_descriptor_jr(ctx->sha_desc);
+
+ if (ret)
+ debug("Error %x\n", ret);
+ else
+ memcpy(dest_buf, ctx->hash, sizeof(ctx->hash));
+
+ free(ctx);
+ return ret;
+}
+
int caam_hash(const unsigned char *pbuf, unsigned int buf_len,
unsigned char *pout, enum caam_hash_algos algo)
{
@@ -48,7 +167,7 @@ int caam_hash(const unsigned char *pbuf, unsigned int buf_len,
desc = malloc(sizeof(int) * MAX_CAAM_DESCSIZE);
if (!desc) {
debug("Not enough memory for descriptor allocation\n");
- return -1;
+ return -ENOMEM;
}
inline_cnstr_jobdesc_hash(desc, pbuf, buf_len, pout,
@@ -75,3 +194,20 @@ void hw_sha1(const unsigned char *pbuf, unsigned int buf_len,
if (caam_hash(pbuf, buf_len, pout, SHA1))
printf("CAAM was not setup properly or it is faulty\n");
}
+
+int hw_sha_init(struct hash_algo *algo, void **ctxp)
+{
+ return caam_hash_init(ctxp, get_hash_type(algo));
+}
+
+int hw_sha_update(struct hash_algo *algo, void *ctx, const void *buf,
+ unsigned int size, int is_last)
+{
+ return caam_hash_update(ctx, buf, size, is_last, get_hash_type(algo));
+}
+
+int hw_sha_finish(struct hash_algo *algo, void *ctx, void *dest_buf,
+ int size)
+{
+ return caam_hash_finish(ctx, dest_buf, size, get_hash_type(algo));
+}
diff --git a/drivers/crypto/fsl/fsl_hash.h b/drivers/crypto/fsl/fsl_hash.h
new file mode 100644
index 0000000..f5be651
--- /dev/null
+++ b/drivers/crypto/fsl/fsl_hash.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ */
+
+#ifndef _SHA_H
+#define _SHA_H
+
+#include <fsl_sec.h>
+#include <hash.h>
+#include "jr.h"
+
+/* We support at most 32 Scatter/Gather Entries.*/
+#define MAX_SG_32 32
+
+/*
+ * Hash context contains the following fields
+ * @sha_desc: Sha Descriptor
+ * @sg_num: number of entries in sg table
+ * @len: total length of buffer
+ * @sg_tbl: sg entry table
+ * @hash: index to the hash calculated
+ */
+struct sha_ctx {
+ uint32_t sha_desc[64];
+ uint32_t sg_num;
+ uint32_t len;
+ struct sg_entry sg_tbl[MAX_SG_32];
+ u8 hash[HASH_MAX_DIGEST_SIZE];
+};
+
+#endif
diff --git a/include/fsl_sec.h b/include/fsl_sec.h
index aa850a3..b6e6f04 100644
--- a/include/fsl_sec.h
+++ b/include/fsl_sec.h
@@ -175,6 +175,32 @@ struct jr_regs {
u32 jrcr;
};
+/*
+ * Scatter Gather Entry - Specifies the the Scatter Gather Format
+ * related information
+ */
+struct sg_entry {
+#ifdef CONFIG_SYS_FSL_SEC_LE
+ uint32_t addr_lo; /* Memory Address - lo */
+ uint16_t addr_hi; /* Memory Address of start of buffer - hi */
+ uint16_t reserved_zero;
+#else
+ uint16_t reserved_zero;
+ uint16_t addr_hi; /* Memory Address of start of buffer - hi */
+ uint32_t addr_lo; /* Memory Address - lo */
+#endif
+
+ uint32_t len_flag; /* Length of the data in the frame */
+#define SG_ENTRY_LENGTH_MASK 0x3FFFFFFF
+#define SG_ENTRY_EXTENSION_BIT 0x80000000
+#define SG_ENTRY_FINAL_BIT 0x40000000
+ uint32_t bpid_offset;
+#define SG_ENTRY_BPID_MASK 0x00FF0000
+#define SG_ENTRY_BPID_SHIFT 16
+#define SG_ENTRY_OFFSET_MASK 0x00001FFF
+#define SG_ENTRY_OFFSET_SHIFT 0
+};
+
int sec_init(void);
#endif
diff --git a/include/hw_sha.h b/include/hw_sha.h
index 783350d..ab19a99 100644
--- a/include/hw_sha.h
+++ b/include/hw_sha.h
@@ -7,7 +7,7 @@
*/
#ifndef __HW_SHA_H
#define __HW_SHA_H
-
+#include <hash.h>
/**
* Computes hash value of input pbuf using h/w acceleration
@@ -34,4 +34,43 @@ void hw_sha256(const uchar * in_addr, uint buflen,
*/
void hw_sha1(const uchar * in_addr, uint buflen,
uchar * out_addr, uint chunk_size);
+
+/*
+ * Create the context for sha progressive hashing using h/w acceleration
+ *
+ * @algo: Pointer to the hash_algo struct
+ * @ctxp: Pointer to the pointer of the context for hashing
+ * @return 0 if ok, -ve on error
+ */
+int hw_sha_init(struct hash_algo *algo, void **ctxp);
+
+/*
+ * Update buffer for sha progressive hashing using h/w acceleration
+ *
+ * The context is freed by this function if an error occurs.
+ *
+ * @algo: Pointer to the hash_algo struct
+ * @ctx: Pointer to the context for hashing
+ * @buf: Pointer to the buffer being hashed
+ * @size: Size of the buffer being hashed
+ * @is_last: 1 if this is the last update; 0 otherwise
+ * @return 0 if ok, -ve on error
+ */
+int hw_sha_update(struct hash_algo *algo, void *ctx, const void *buf,
+ unsigned int size, int is_last);
+
+/*
+ * Copy sha hash result at destination location
+ *
+ * The context is freed after completion of hash operation or after an error.
+ *
+ * @algo: Pointer to the hash_algo struct
+ * @ctx: Pointer to the context for hashing
+ * @dest_buf: Pointer to the destination buffer where hash is to be copied
+ * @size: Size of the buffer being hashed
+ * @return 0 if ok, -ve on error
+ */
+int hw_sha_finish(struct hash_algo *algo, void *ctx, void *dest_buf,
+ int size);
+
#endif
diff --git a/lib/Kconfig b/lib/Kconfig
index a1f30a2..e3dd7ad 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -29,4 +29,42 @@ config SYS_HZ
source lib/rsa/Kconfig
+menu "Hashing Support"
+
+config SHA1
+ bool "Enable SHA1 support"
+ help
+ This option enables support of hashing using SHA1 algorithm.
+ The hash is calculated in software.
+ The SHA1 algorithm produces a 160bits (20-byte) hash value
+ termed as digest size.
+
+config SHA256
+ bool "Enable SHA256 support"
+ help
+ This option enables support of hashing using SHA256 algorithm.
+ The hash is calculated in software.
+ The SHA256 algorithm produces a 256bits (32-byte) hash value
+ termed as digest size.
+
+config SHA_HW_ACCEL
+ bool "Enable hashing using hardware"
+ help
+ This option enables calculation of hash using SHA1/SHA256 algorithm
+ in hardware. The files using hash_lookup_algo function would get
+ pointer to structure having hardware accelerated SHA support. The
+ hash command would automatically use hardware support if this option
+ is enabled.
+
+config SHA_PROG_HW_ACCEL
+ bool "Enable Progressive hashing support using hardware"
+ depends on SHA_HW_ACCEL
+ help
+ This option enables SHA1 or SHA256 progressive hashing using hardware
+ acceleration. The hash_progressive_lookup_algo function would return
+ pointer to structure having support for progressive hashing in
+ hardware. FIT_SIGNATURE which uses this function would automatically
+ use hardware support if this option is enabled.
+endmenu
+
endmenu
--
1.8.1.4
2
1