Skip to content

Commit

Permalink
Merge branch 'iu-boot/master' into 'u-boot-arm/master'
Browse files Browse the repository at this point in the history
Conflicts:
	arch/arm/cpu/arm926ejs/mxs/Makefile
	board/compulab/cm_t35/Makefile
	board/corscience/tricorder/Makefile
	board/ppcag/bg0900/Makefile
	drivers/bootcount/Makefile
	include/configs/omap4_common.h
	include/configs/pdnb3.h

Makefile conflicts are due to additions/removals of
object files on the ARM branch vs KBuild introduction
on the main branch. Resolution consists in adjusting
the list of object files in the main branch version.
This also applies to two files which are not listed
as conflicting but had to be modified:

	board/compulab/common/Makefile
	board/udoo/Makefile

include/configs/omap4_common.h conflicts are due to
the OMAP4 conversion to ti_armv7_common.h on the ARM
side, and CONFIG_SYS_HZ removal on the main side.
Resolution is to convert as this icludes removal of
CONFIG_SYS_HZ.

include/configs/pdnb3.h is due to a removal on ARM side.
Trivial resolution is to remove the file.

Note: 'git show' will also list two files just because
they are new:

	include/configs/am335x_igep0033.h
	include/configs/omap3_igep00x0.h
  • Loading branch information
albert-aribaud-u-boot committed Nov 9, 2013
2 parents 15c5cdf + 3285d4c commit 85b8c5c
Show file tree
Hide file tree
Showing 95 changed files with 1,730 additions and 1,172 deletions.
10 changes: 5 additions & 5 deletions arch/arm/cpu/arm926ejs/mxs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ obj-y += spl_boot.o spl_lradc_init.o spl_mem_init.o spl_power_init.o
endif

# Specify the target for use in elftosb call
ELFTOSB_TARGET-$(CONFIG_MX23) = imx23
ELFTOSB_TARGET-$(CONFIG_MX28) = imx28
MKIMAGE_TARGET-$(CONFIG_MX23) = mx23
MKIMAGE_TARGET-$(CONFIG_MX28) = mx28

$(OBJTREE)/u-boot.bd: $(SRCTREE)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd
$(OBJTREE)/mxsimage.cfg: $(SRCTREE)/$(CPUDIR)/$(SOC)/mxsimage.$(MKIMAGE_TARGET-y).cfg
sed "s@OBJTREE@$(OBJTREE)@g" $^ > $@

$(OBJTREE)/u-boot.sb: $(OBJTREE)/u-boot.bin $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/u-boot.bd
elftosb -zf $(ELFTOSB_TARGET-y) -c $(OBJTREE)/u-boot.bd -o $(OBJTREE)/u-boot.sb
$(OBJTREE)/u-boot.sb: $(OBJTREE)/u-boot.bin $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/mxsimage.cfg
$(OBJTREE)/tools/mkimage -n $(OBJTREE)/mxsimage.cfg -T mxsimage $@
4 changes: 2 additions & 2 deletions arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SECTION 0x0 BOOTABLE
TAG LAST
LOAD 0x0 spl/u-boot-spl.bin
LOAD 0x0 OBJTREE/spl/u-boot-spl.bin
CALL 0x14 0x0
LOAD 0x40000100 u-boot.bin
LOAD 0x40000100 OBJTREE/u-boot.bin
CALL 0x40000100 0x0
4 changes: 2 additions & 2 deletions arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SECTION 0x0 BOOTABLE
TAG LAST
LOAD 0x0 spl/u-boot-spl.bin
LOAD 0x0 OBJTREE/spl/u-boot-spl.bin
LOAD IVT 0x8000 0x14
CALL HAB 0x8000 0x0
LOAD 0x40000100 u-boot.bin
LOAD 0x40000100 OBJTREE/u-boot.bin
LOAD IVT 0x8000 0x40000100
CALL HAB 0x8000 0x0
2 changes: 2 additions & 0 deletions arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,8 @@ static void mxs_batt_boot(void)
clrsetbits_le32(&power_regs->hw_power_5vctrl,
POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK,
0x8 << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET);

mxs_power_enable_4p2();
}

/**
Expand Down
9 changes: 9 additions & 0 deletions arch/arm/cpu/arm926ejs/mxs/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ IRQ_STACK_START_IN:
*/

_reset:
/*
* If the CPU is configured in "Wait JTAG connection mode", the stack
* pointer is not configured and is zero. This will cause crash when
* trying to push data onto stack right below here. Load the SP and make
* it point to the end of OCRAM if the SP is zero.
*/
cmp sp, #0x00000000
ldreq sp, =CONFIG_SYS_INIT_SP_ADDR

/*
* Store all registers on old stack pointer, this will allow us later to
* return to the BootROM and let the BootROM load U-Boot into RAM.
Expand Down
7 changes: 4 additions & 3 deletions arch/arm/cpu/armv7/am33xx/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/usb/gadget.h>
#include <linux/usb/musb.h>
#include <asm/omap_musb.h>
#include <asm/davinci_rtc.h>

DECLARE_GLOBAL_DATA_PTR;

Expand Down Expand Up @@ -150,15 +151,15 @@ __weak void am33xx_spl_board_init(void)

static void rtc32k_enable(void)
{
struct rtc_regs *rtc = (struct rtc_regs *)RTC_BASE;
struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE;

/*
* Unlock the RTC's registers. For more details please see the
* RTC_SS section of the TRM. In order to unlock we need to
* write these specific values (keys) in this order.
*/
writel(0x83e70b13, &rtc->kick0r);
writel(0x95a4f1e0, &rtc->kick1r);
writel(RTC_KICK0R_WE, &rtc->kick0r);
writel(RTC_KICK1R_WE, &rtc->kick1r);

/* Enable the RTC 32K OSC by setting bits 3 and 6. */
writel((1 << 3) | (1 << 6), &rtc->osc);
Expand Down
12 changes: 6 additions & 6 deletions arch/arm/cpu/armv7/mx5/lowlevel_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
#endif

mcr 15, 1, r0, c9, c0, 2

/* enable L2 cache */
mrc 15, 0, r0, c1, c0, 1
orr r0, r0, #2
mcr 15, 0, r0, c1, c0, 1

.endm /* init_l2cc */

/* AIPS setup - Only setup MPROTx registers.
Expand Down Expand Up @@ -369,12 +375,6 @@ setup_pll_func:
#endif /* CONFIG_MX53 */
.endm

.macro setup_wdog
ldr r0, =WDOG1_BASE_ADDR
mov r1, #0x30
strh r1, [r0]
.endm

ENTRY(lowlevel_init)
mov r10, lr
mov r4, #0 /* Fix R4 to 0 */
Expand Down
56 changes: 42 additions & 14 deletions arch/arm/cpu/armv7/mx6/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,32 @@ static u32 decode_pll(enum pll_clocks pll, u32 infreq)
}
/* NOTREACHED */
}
static u32 mxc_get_pll_pfd(enum pll_clocks pll, int pfd_num)
{
u32 div;
u64 freq;

switch (pll) {
case PLL_BUS:
if (pfd_num == 3) {
/* No PFD3 on PPL2 */
return 0;
}
div = __raw_readl(&imx_ccm->analog_pfd_528);
freq = (u64)decode_pll(PLL_BUS, MXC_HCLK);
break;
case PLL_USBOTG:
div = __raw_readl(&imx_ccm->analog_pfd_480);
freq = (u64)decode_pll(PLL_USBOTG, MXC_HCLK);
break;
default:
/* No PFD on other PLL */
return 0;
}

return (freq * 18) / ((div & ANATOP_PFD_FRAC_MASK(pfd_num)) >>
ANATOP_PFD_FRAC_SHIFT(pfd_num));
}

static u32 get_mcu_main_clk(void)
{
Expand Down Expand Up @@ -144,13 +170,14 @@ u32 get_periph_clk(void)
freq = decode_pll(PLL_BUS, MXC_HCLK);
break;
case 1:
freq = PLL2_PFD2_FREQ;
freq = mxc_get_pll_pfd(PLL_BUS, 2);
break;
case 2:
freq = PLL2_PFD0_FREQ;
freq = mxc_get_pll_pfd(PLL_BUS, 0);
break;
case 3:
freq = PLL2_PFD2_DIV_FREQ;
/* static / 2 divider */
freq = mxc_get_pll_pfd(PLL_BUS, 2) / 2;
break;
default:
break;
Expand Down Expand Up @@ -184,7 +211,7 @@ static u32 get_ipg_per_clk(void)
static u32 get_uart_clk(void)
{
u32 reg, uart_podf;
u32 freq = PLL3_80M;
u32 freq = decode_pll(PLL_USBOTG, MXC_HCLK) / 6; /* static divider */
reg = __raw_readl(&imx_ccm->cscdr1);
#ifdef CONFIG_MX6SL
if (reg & MXC_CCM_CSCDR1_UART_CLK_SEL)
Expand All @@ -204,7 +231,7 @@ static u32 get_cspi_clk(void)
reg &= MXC_CCM_CSCDR2_ECSPI_CLK_PODF_MASK;
cspi_podf = reg >> MXC_CCM_CSCDR2_ECSPI_CLK_PODF_OFFSET;

return PLL3_60M / (cspi_podf + 1);
return decode_pll(PLL_USBOTG, MXC_HCLK) / (8 * (cspi_podf + 1));
}

static u32 get_axi_clk(void)
Expand All @@ -217,9 +244,9 @@ static u32 get_axi_clk(void)

if (cbcdr & MXC_CCM_CBCDR_AXI_SEL) {
if (cbcdr & MXC_CCM_CBCDR_AXI_ALT_SEL)
root_freq = PLL2_PFD2_FREQ;
root_freq = mxc_get_pll_pfd(PLL_BUS, 2);
else
root_freq = PLL3_PFD1_FREQ;
root_freq = mxc_get_pll_pfd(PLL_USBOTG, 1);
} else
root_freq = get_periph_clk();

Expand All @@ -244,10 +271,10 @@ static u32 get_emi_slow_clk(void)
root_freq = decode_pll(PLL_USBOTG, MXC_HCLK);
break;
case 2:
root_freq = PLL2_PFD2_FREQ;
root_freq = mxc_get_pll_pfd(PLL_BUS, 2);
break;
case 3:
root_freq = PLL2_PFD0_FREQ;
root_freq = mxc_get_pll_pfd(PLL_BUS, 0);
break;
}

Expand All @@ -270,13 +297,14 @@ static u32 get_mmdc_ch0_clk(void)
freq = decode_pll(PLL_BUS, MXC_HCLK);
break;
case 1:
freq = PLL2_PFD2_FREQ;
freq = mxc_get_pll_pfd(PLL_BUS, 2);
break;
case 2:
freq = PLL2_PFD0_FREQ;
freq = mxc_get_pll_pfd(PLL_BUS, 0);
break;
case 3:
freq = PLL2_PFD2_DIV_FREQ;
/* static / 2 divider */
freq = mxc_get_pll_pfd(PLL_BUS, 2) / 2;
}

return freq / (podf + 1);
Expand Down Expand Up @@ -359,9 +387,9 @@ static u32 get_usdhc_clk(u32 port)
}

if (clk_sel)
root_freq = PLL2_PFD0_FREQ;
root_freq = mxc_get_pll_pfd(PLL_BUS, 0);
else
root_freq = PLL2_PFD2_FREQ;
root_freq = mxc_get_pll_pfd(PLL_BUS, 2);

return root_freq / (usdhc_podf + 1);
}
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/cpu/armv7/omap-common/boot-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <asm/arch/omap.h>
#include <asm/arch/mmc_host_def.h>
#include <asm/arch/sys_proto.h>
#include <watchdog.h>

DECLARE_GLOBAL_DATA_PTR;

Expand Down Expand Up @@ -76,6 +77,9 @@ void spl_board_init(void)
#if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW_SUPPORT)
arch_misc_init();
#endif
#if defined(CONFIG_HW_WATCHDOG)
hw_watchdog_init();
#endif
#ifdef CONFIG_AM33XX
am33xx_spl_board_init();
#endif
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/cpu/armv7/zynq/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#include <asm/arch/hardware.h>

void lowlevel_init(void)
{
}

int arch_cpu_init(void)
{
zynq_slcr_unlock();
/* remap DDR to zero, FILTERSTART */
Expand All @@ -31,6 +35,8 @@ void lowlevel_init(void)
writel(0xC, &slcr_base->ddr_urgent);

zynq_slcr_lock();

return 0;
}

void reset_cpu(ulong addr)
Expand Down
9 changes: 0 additions & 9 deletions arch/arm/include/asm/arch-am33xx/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,15 +457,6 @@ struct gptimer {
unsigned int tcar2; /* offset 0x58 */
};

/* RTC Registers */
struct rtc_regs {
unsigned int res[21];
unsigned int osc; /* offset 0x54 */
unsigned int res2[5];
unsigned int kick0r; /* offset 0x6c */
unsigned int kick1r; /* offset 0x70 */
};

/* UART Registers */
struct uart_sys {
unsigned int resv1[21];
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/include/asm/arch-at91/at91_pmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ typedef struct at91_pmc {
#endif
#define AT91_PMC_USBS_USB_PLLA (0x0) /* USB Clock Input is PLLA */
#define AT91_PMC_USBS_USB_UPLL (0x1) /* USB Clock Input is UPLL */
#define AT91_PMC_USBS_USB_PLLB (0x1) /* USB Clock Input is PLLB, AT91SAM9N12 only */
#define AT91_PMC_USB_DIV_2 (0x1 << 8) /* USB Clock divided by 2 */
#define AT91_PMC_USBDIV_8 (0x7 << 8) /* USB Clock divided by 8 */
#define AT91_PMC_USBDIV_10 (0x9 << 8) /* USB Clock divided by 10 */

Expand Down
7 changes: 7 additions & 0 deletions arch/arm/include/asm/arch-at91/at91_rstc.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,11 @@ typedef struct at91_rstc {

#define AT91_RSTC_SR_NRSTL 0x00010000

#define AT91_RSTC_RSTTYP (7 << 8) /* Reset Type */
#define AT91_RSTC_RSTTYP_GENERAL (0 << 8)
#define AT91_RSTC_RSTTYP_WAKEUP (1 << 8)
#define AT91_RSTC_RSTTYP_WATCHDOG (2 << 8)
#define AT91_RSTC_RSTTYP_SOFTWARE (3 << 8)
#define AT91_RSTC_RSTTYP_USER (4 << 8)

#endif
38 changes: 0 additions & 38 deletions arch/arm/include/asm/arch-davinci/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,42 +613,4 @@ static inline enum davinci_clk_ids get_async3_src(void)

#endif

struct davinci_rtc {
dv_reg second;
dv_reg minutes;
dv_reg hours;
dv_reg day;
dv_reg month; /* 0x10 */
dv_reg year;
dv_reg dotw;
dv_reg resv1;
dv_reg alarmsecond; /* 0x20 */
dv_reg alarmminute;
dv_reg alarmhour;
dv_reg alarmday;
dv_reg alarmmonth; /* 0x30 */
dv_reg alarmyear;
dv_reg resv2[2];
dv_reg ctrl; /* 0x40 */
dv_reg status;
dv_reg irq;
dv_reg complsb;
dv_reg compmsb; /* 0x50 */
dv_reg osc;
dv_reg resv3[2];
dv_reg scratch0; /* 0x60 */
dv_reg scratch1;
dv_reg scratch2;
dv_reg kick0r;
dv_reg kick1r; /* 0x70 */
};

#define RTC_STATE_BUSY 0x01
#define RTC_STATE_RUN 0x02

#define RTC_KICK0R_WE 0x83e70b13
#define RTC_KICK1R_WE 0x95a4f1e0

#define davinci_rtc_base ((struct davinci_rtc *)DAVINCI_RTC_BASE)

#endif /* __ASM_ARCH_HARDWARE_H */
11 changes: 0 additions & 11 deletions arch/arm/include/asm/arch-mx6/crm_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -890,15 +890,4 @@ struct mxc_ccm_reg {
#define BF_ANADIG_PFD_528_PFD0_FRAC(v) \
(((v) << 0) & BM_ANADIG_PFD_528_PFD0_FRAC)

#define PLL2_PFD0_FREQ 352000000
#define PLL2_PFD1_FREQ 594000000
#define PLL2_PFD2_FREQ 396000000
#define PLL2_PFD2_DIV_FREQ 200000000
#define PLL3_PFD0_FREQ 720000000
#define PLL3_PFD1_FREQ 540000000
#define PLL3_PFD2_FREQ 508200000
#define PLL3_PFD3_FREQ 454700000
#define PLL3_80M 80000000
#define PLL3_60M 60000000

#endif /*__ARCH_ARM_MACH_MX6_CCM_REGS_H__ */
2 changes: 1 addition & 1 deletion arch/arm/include/asm/arch-mx6/mx6dl_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ enum {
MX6_PAD_DI0_PIN3__MMDC_MMDC_DEBUG_3 = IOMUX_PAD(0x03BC, 0x00A8, 6, 0x0000, 0, 0),
MX6_PAD_DI0_PIN3__PL301_SIM_MX6DL_PER1_HADDR_10 = IOMUX_PAD(0x03BC, 0x00A8, 7, 0x0000, 0, 0),
MX6_PAD_DI0_PIN3__LCDIF_CS = IOMUX_PAD(0x03BC, 0x00A8, 8, 0x0000, 0, 0),
MX6_PAD_DI0_PIN4__IPU1_DI0_PIN4 = IOMUX_PAD(0x03C0, 0x00AC, 0, 0x0000, 0, PAD_CTL_DSE_120ohm),
MX6_PAD_DI0_PIN4__IPU1_DI0_PIN4 = IOMUX_PAD(0x03C0, 0x00AC, 0, 0x0000, 0, 0),
MX6_PAD_DI0_PIN4__LCDIF_BUSY = IOMUX_PAD(0x03C0, 0x00AC, 1, 0x08D8, 1, 0),
MX6_PAD_DI0_PIN4__AUDMUX_AUD6_RXD = IOMUX_PAD(0x03C0, 0x00AC, 2, 0x0000, 0, 0),
MX6_PAD_DI0_PIN4__USDHC1_WP = IOMUX_PAD(0x03C0, 0x00AC, 3, 0x092C, 0, 0),
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/include/asm/arch-mxs/sys_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static const struct mxs_pair mxs_boot_modes[] = {
{ 0x02, 0x1f, "SSP SPI #1, master, NOR" },
{ 0x03, 0x1f, "SSP SPI #2, master, NOR" },
{ 0x04, 0x1f, "NAND" },
{ 0x06, 0x1f, "JTAG" },
{ 0x08, 0x1f, "SSP SPI #3, master, EEPROM" },
{ 0x09, 0x1f, "SSP SD/MMC #0" },
{ 0x0a, 0x1f, "SSP SD/MMC #1" },
Expand All @@ -60,6 +61,7 @@ static const struct mxs_pair mxs_boot_modes[] = {
{ 0x13, 0x1f, "SSP SPI #3, master, 1V8 NOR" },
{ 0x04, 0x1f, "NAND, 3V3" },
{ 0x14, 0x1f, "NAND, 1V8" },
{ 0x06, 0x1f, "JTAG" },
{ 0x08, 0x1f, "SSP SPI #3, master, 3V3 EEPROM" },
{ 0x18, 0x1f, "SSP SPI #3, master, 1V8 EEPROM" },
{ 0x09, 0x1f, "SSP SD/MMC #0, 3V3" },
Expand Down
Loading

0 comments on commit 85b8c5c

Please sign in to comment.