/* Lock the mpu dpll */
sr32(CM_CLKMODE_DPLL_MPU, 0, 3, PLL_LOCK | 0x10);
wait_on_value(BIT0, 1, CM_IDLEST_DPLL_MPU, LDELAY);
-
- return;
}
static void configure_iva_dpll(u32 clk_index)
sr32(CM_CLKDCOLDO_DPLL_USB, 0, 32, 0x100);
}
-static void configure_core_dpll(clk_index)
+#if 0
+
+/* to remove warning about unused function; will be deleted in decruft patch */
+static void configure_core_dpll(int clk_index)
{
struct dpll_param *dpll_param_p;
sr32(CM_CLKMODE_DPLL_CORE, 0, 3, PLL_LOCK);
wait_on_value(BIT0, 1, CM_IDLEST_DPLL_CORE, LDELAY);
}
-
+#endif
void configure_core_dpll_no_lock(void)
{
- struct dpll_param *dpll_param_p;
+ struct dpll_param *dpll_param_p = NULL;
u32 clk_index;
/* Get the sysclk speed from cm_sys_clksel
case OMAP4430_ES2_1:
dpll_param_p = &core_dpll_param_ddr400[clk_index];
break;
+ default:
+ /* we are screwed */
+ break;
}
/* Disable autoidle */
void lock_core_dpll_shadow(void)
{
- struct dpll_param *dpll_param_p;
+ struct dpll_param *dpll_param_p = NULL;
/* Lock the core dpll using freq update method */
- *(volatile int*)0x4A004120 = 10; /* CM_CLKMODE_DPLL_CORE */
+ *(volatile int *)0x4A004120 = 10; /* CM_CLKMODE_DPLL_CORE */
switch (omap_revision()) {
case OMAP4430_ES1_0:
case OMAP4430_ES2_1:
dpll_param_p = &core_dpll_param_ddr400[6];
break;
+ default:
+ /* we are screwed */
+ break;
}
/* CM_SHADOW_FREQ_CONFIG1: DLL_OVERRIDE = 1(hack), DLL_RESET = 1,
static void enable_all_clocks(void)
{
- volatile int regvalue = 0;
-
/* Enable Ducati clocks */
sr32(CM_DUCATI_DUCATI_CLKCTRL, 0, 32, 0x1);
sr32(CM_DUCATI_CLKSTCTRL, 0, 32, 0x2);
delay(1);
}
+void reset_phy(unsigned int base)
+{
+ *(volatile int *)(base + IODFT_TLGC) |= (1 << 10);
+}
+
/* TODO: FREQ update method is not working so shadow registers programming
* is just for same of completeness. This would be safer if auto
* trasnitions are working
static int emif_config(unsigned int base)
{
unsigned int reg_value, rev;
- const struct ddr_regs *ddr_regs;
+ const struct ddr_regs *ddr_regs = NULL;
rev = omap_revision();
if (rev == OMAP4430_ES1_0)
ddr_regs = &ddr_regs_200_mhz_2cs;
else if (rev >= OMAP4430_ES2_1)
ddr_regs = &ddr_regs_400_mhz_2cs;
+
/*
* set SDRAM CONFIG register
* EMIF_SDRAM_CONFIG[31:29] REG_SDRAM_TYPE = 4 for LPDDR2-S4
*(volatile int*)(base + EMIF_LPDDR2_MODE_REG_DATA) = 0;
/* LPDDR2 init complete */
+ return 0;
}
/*****************************************
* Routine: ddr_init
***********************************************************/
void try_unlock_memory(void)
{
- int mode;
-
/* if GP device unlock device SRAM for general use */
/* secure code breaks for Secure/Emulation device - HS/E/T*/
- return;
}
#if defined(CONFIG_MPU_600) || defined(CONFIG_MPU_1000)
-static scale_vcores(void)
+static int scale_vcores(void)
{
unsigned int rev = omap_revision();
/* For VC bypass only VCOREx_CGF_FORCE is necessary and
/* PRM_IRQSTATUS_MPU */
*(volatile int*)(0x4A306010) = *(volatile int*)(0x4A306010);
+ return 0;
}
#endif
void set_muxconf_regs(void)
{
MUX_DEFAULT_OMAP4();
- return;
}
/******************************************************************************
void update_mux(u32 btype, u32 mtype)
{
/* REVISIT */
- return;
-
}
/* optionally do something like blinking LED */
{
return 0;
}
-void reset_phy(unsigned int base)
-{
- *(volatile int*)(base + IODFT_TLGC) |= (1 << 10);
-}
unsigned char mmc_board_init(void)
{
- unsigned int value = 0;
-
return 1;
}
return 1;
}
unsigned long mmc_bread(int dev_num, unsigned long blknr, lbaint_t blkcnt,
- void *dst)
+ unsigned long *dst)
{
omap_mmc_read_sect(blknr, (blkcnt * MMCSD_SECTOR_SIZE), &cur_card_data,
- (unsigned long *) dst);
+ dst);
return 1;
}
/* Read a new block of FAT entries into the cache. */
if (bufnum != mydata->fatbufnum) {
int getsize = FATBUFSIZE/FS_BLOCK_SIZE;
- __u8 *bufptr = mydata->fatbuf;
+ __u8 *bufptr = (__u8 *)mydata->fatbuf;
__u32 fatlength = mydata->fatlength;
__u32 startblock = bufnum * FATBUFBLOCKS;
- unsigned long i;
fatlength *= SECTOR_SIZE; /* We want it in bytes now */
startblock += mydata->fat_sect; /* Offset from start of disk */
#ifdef CONFIG_SUPPORT_VFAT
-/*
- * Extract the file name information from 'slotptr' into 'l_name',
- * starting at l_name[*idx].
- * Return 1 if terminator (zero byte) is found, 0 otherwise.
- */
-static int
-slot2str(dir_slot *slotptr, char *l_name, int *idx)
-{
- int j;
-
- for (j = 0; j <= 8; j += 2) {
- l_name[*idx] = slotptr->name0_4[j];
- if (l_name[*idx] == 0x00) return 1;
- (*idx)++;
- }
- for (j = 0; j <= 10; j += 2) {
- l_name[*idx] = slotptr->name5_10[j];
- if (l_name[*idx] == 0x00) return 1;
- (*idx)++;
- }
- for (j = 0; j <= 2; j += 2) {
- l_name[*idx] = slotptr->name11_12[j];
- if (l_name[*idx] == 0x00) return 1;
- (*idx)++;
- }
-
- return 0;
-}
/* Calculate short name checksum */
static __u8
char *filename, dir_entry * retdent,
int dols)
{
-
+ return NULL;
}
#if 0
{
__u8 block[FS_BLOCK_SIZE];
volume_info *vistart;
+ char *p;
printf("Reading boot sector\n");
/* Terminate fs_type string. Writing past the end of vistart
is ok - it's just the buffer. */
- vistart->fs_type[8] = '\0';
+ p = (char *)&vistart->fs_type[0];
+ p[8] = '\0';
if (*fatsize == 32) {
if (compare_sign(FAT32_SIGN, vistart->fs_type) == 0) {
__u8 do_fat_read_block[MAX_CLUSTSIZE]; /* Block buffer */
#endif
-__u8 *fnamecopy = 0x80500000;
-__u8 *do_fat_read_block = 0x80500880;
+__u8 *fnamecopy = (__u8 *)0x80500000;
+__u8 *do_fat_read_block = (__u8 *)0x80500880;
boot_sector bs;
volume_info volinfo;
while (ISDIRDELIM (*filename))
filename++;
/* Make a copy of the filename and convert it to lowercase */
- strcpy (fnamecopy, filename);
- downcase (fnamecopy);
+ strcpy ((char *)fnamecopy, filename);
+ downcase ((char *)fnamecopy);
if (*fnamecopy == '\0') {
if (!dols){
printf("\n not there\n");
return -1;
}
dols = LS_ROOT;
- } else if ((idx = dirdelim (fnamecopy)) >= 0) {
+ } else if ((idx = dirdelim ((char *)fnamecopy)) >= 0) {
isdir = 1;
fnamecopy[idx] = '\0';
- subname = fnamecopy + idx + 1;
+ subname = (char *)fnamecopy + idx + 1;
/* Handle multiple delimiters */
while (ISDIRDELIM (*subname))
subname++;
dentptr++;
continue;
}
- if (strcmp (fnamecopy, s_name) && strcmp (fnamecopy, l_name)) {
+ if (strcmp ((char *)fnamecopy, s_name) &&
+ strcmp ((char *)fnamecopy, l_name)) {
FAT_DPRINT ("RootMismatch: |%s|%s|\n", s_name, l_name);
dentptr++;
continue;
/* lib/board.c */
void hang (void) __attribute__ ((noreturn));
+
+extern int do_load_serial_bin (ulong offset, int baudrate);
+extern u32 get_mem_type(void);
+extern int mmc_init(int verbose);
+extern int misc_init_r(void);
+
+extern int sprintf (char *__s, const char *__format, ...);
+
#endif /* __COMMON_H_ */
return 0;
}
-static int init_func_i2c (void)
-{
+/* !!! why is I2C dependent on MMC? */
+
#ifdef CONFIG_MMC
#ifdef CONFIG_DRIVER_OMAP34XX_I2C
+static int init_func_i2c (void)
+{
i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);
-#endif
-#endif
return 0;
}
+#endif
+#endif
typedef int (init_fnc_t) (void);
void start_armboot (void)
{
init_fnc_t **init_fnc_ptr;
- int i, size;
+ int size;
uchar *buf;
int *first_instruction;
- block_dev_desc_t *dev_desc = NULL;
- for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
- if ((*init_fnc_ptr)() != 0) {
+ for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr)
+ if ((*init_fnc_ptr)())
hang ();
- }
- }
misc_init_r();