mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
Merge branch 'master' of git://git.denx.de/u-boot-coldfire
This commit is contained in:
commit
40e44c8bf5
5 changed files with 36 additions and 15 deletions
|
@ -173,6 +173,15 @@ void cpu_init_f(void)
|
||||||
|
|
||||||
/* Lowest slew rate for UART0,1,2 */
|
/* Lowest slew rate for UART0,1,2 */
|
||||||
out_8(&gpio->srcr_uart, 0x00);
|
out_8(&gpio->srcr_uart, 0x00);
|
||||||
|
|
||||||
|
#ifdef CONFIG_FSL_ESDHC
|
||||||
|
/* eSDHC pin as faster speed */
|
||||||
|
out_8(&gpio->srcr_sdhc, 0x03);
|
||||||
|
|
||||||
|
/* All esdhc pins as SD */
|
||||||
|
out_8(&gpio->par_sdhch, 0xff);
|
||||||
|
out_8(&gpio->par_sdhcl, 0xff);
|
||||||
|
#endif
|
||||||
#endif /* CONFIG_MCF5441x */
|
#endif /* CONFIG_MCF5441x */
|
||||||
|
|
||||||
#ifdef CONFIG_MCF5445x
|
#ifdef CONFIG_MCF5445x
|
||||||
|
@ -534,4 +543,5 @@ void cfspi_release_bus(uint bus, uint cs)
|
||||||
clrbits_8(&gpio->par_dspiow, GPIO_PAR_DSPIOW_DSPI0PSC1);
|
clrbits_8(&gpio->par_dspiow, GPIO_PAR_DSPIOW_DSPI0PSC1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -120,6 +120,8 @@ void setup_5441x_clocks(void)
|
||||||
temp = ((pdr & PLL_DR_OUTDIV2_BITS) >> 5) + 1;
|
temp = ((pdr & PLL_DR_OUTDIV2_BITS) >> 5) + 1;
|
||||||
gd->bus_clk = vco / temp; /* bus clock */
|
gd->bus_clk = vco / temp; /* bus clock */
|
||||||
|
|
||||||
|
temp = ((pdr & PLL_DR_OUTDIV3_BITS) >> 10) + 1;
|
||||||
|
gd->arch.sdhc_clk = vco / temp;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -10,21 +10,28 @@
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define __sw16(x) \
|
|
||||||
((__u16)( \
|
static inline __u32 __sw32(__u32 x)
|
||||||
(((__u16)(x) & (__u16)0x00ffU) << 8) | \
|
{
|
||||||
(((__u16)(x) & (__u16)0xff00U) >> 8) ))
|
__u32 v = x;
|
||||||
#define __sw32(x) \
|
|
||||||
((__u32)( \
|
return v << 24 |
|
||||||
(((__u32)(x)) << 24) | \
|
(v & (__u32)0x0000ff00UL) << 8 |
|
||||||
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
|
(v & (__u32)0x00ff0000UL) >> 8 |
|
||||||
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
|
v >> 24;
|
||||||
(((__u32)(x)) >> 24) ))
|
}
|
||||||
|
|
||||||
|
static inline __u16 __sw16(__u16 x)
|
||||||
|
{
|
||||||
|
__u16 v = x;
|
||||||
|
|
||||||
|
return (v & (__u16)0x00ffU) << 8 |
|
||||||
|
(v & (__u16)0xff00U) >> 8;
|
||||||
|
}
|
||||||
|
|
||||||
static __inline__ unsigned ld_le16(const volatile unsigned short *addr)
|
static __inline__ unsigned ld_le16(const volatile unsigned short *addr)
|
||||||
{
|
{
|
||||||
unsigned result = *addr;
|
return __sw16(*addr);
|
||||||
return __sw16(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline__ void st_le16(volatile unsigned short *addr,
|
static __inline__ void st_le16(volatile unsigned short *addr,
|
||||||
|
@ -35,8 +42,7 @@ static __inline__ void st_le16(volatile unsigned short *addr,
|
||||||
|
|
||||||
static __inline__ unsigned ld_le32(const volatile unsigned *addr)
|
static __inline__ unsigned ld_le32(const volatile unsigned *addr)
|
||||||
{
|
{
|
||||||
unsigned result = *addr;
|
return __sw32(*addr);
|
||||||
return __sw32(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline__ void st_le32(volatile unsigned *addr, const unsigned val)
|
static __inline__ void st_le32(volatile unsigned *addr, const unsigned val)
|
||||||
|
|
|
@ -18,6 +18,9 @@ struct arch_global_data {
|
||||||
unsigned long vco_clk;
|
unsigned long vco_clk;
|
||||||
unsigned long flb_clk;
|
unsigned long flb_clk;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_MCF5441x
|
||||||
|
unsigned long sdhc_clk;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <asm-generic/global_data.h>
|
#include <asm-generic/global_data.h>
|
||||||
|
|
|
@ -362,7 +362,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CONFIG_SYS_INTR_BASE (MMAP_INTC0)
|
#define CONFIG_SYS_INTR_BASE (MMAP_INTC0)
|
||||||
#define CONFIG_SYS_NUM_IRQS (128)
|
#define CONFIG_SYS_NUM_IRQS (192)
|
||||||
|
|
||||||
#endif /* CONFIG_M54418 */
|
#endif /* CONFIG_M54418 */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue