command: Remove the cmd_tbl_t typedef
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
691d719db7
commit
0914011310
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <bootstage.h>
|
#include <bootstage.h>
|
||||||
|
#include <env.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include <irq_func.h>
|
#include <irq_func.h>
|
||||||
#include <lmb.h>
|
#include <lmb.h>
|
||||||
|
@ -13,7 +13,7 @@ __weak void reset_cpu(ulong addr)
|
|||||||
__builtin_arc_brk();
|
__builtin_arc_brk();
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
printf("Resetting the board...\n");
|
printf("Resetting the board...\n");
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <clock_legacy.h>
|
#include <clock_legacy.h>
|
||||||
|
#include <command.h>
|
||||||
#include <div64.h>
|
#include <div64.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
@ -379,8 +380,8 @@ u32 imx_get_fecclk(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int do_mx35_showclocks(cmd_tbl_t *cmdtp,
|
int do_mx35_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
int flag, int argc, char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
u32 cpufreq = get_mcu_main_clk();
|
u32 cpufreq = get_mcu_main_clk();
|
||||||
printf("mx35 cpu clock: %dMHz\n", cpufreq / 1000000);
|
printf("mx35 cpu clock: %dMHz\n", cpufreq / 1000000);
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
#include <hang.h>
|
#include <hang.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
@ -187,7 +188,8 @@ int print_cpuinfo(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int do_mx28_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
int do_mx28_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
printf("CPU: %3d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
|
printf("CPU: %3d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
|
||||||
printf("BUS: %3d MHz\n", mxc_get_clock(MXC_AHB_CLK) / 1000000);
|
printf("BUS: %3d MHz\n", mxc_get_clock(MXC_AHB_CLK) / 1000000);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/hardware.h>
|
#include <asm/arch/hardware.h>
|
||||||
@ -81,7 +82,7 @@ int print_cpuinfo(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) && defined(CONFIG_NAND_FSMC)
|
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) && defined(CONFIG_NAND_FSMC)
|
||||||
static int do_switch_ecc(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_switch_ecc(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
if (argc != 2)
|
if (argc != 2)
|
||||||
|
@ -182,7 +182,8 @@ static int write_mac(uchar *mac)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_chip_config(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
void (*sram_setfreq) (unsigned int, unsigned int);
|
void (*sram_setfreq) (unsigned int, unsigned int);
|
||||||
unsigned int frequency;
|
unsigned int frequency;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <clock_legacy.h>
|
#include <clock_legacy.h>
|
||||||
|
#include <command.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
@ -240,8 +241,8 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Dump some core clocks */
|
/* Dump some core clocks */
|
||||||
int do_vf610_showclocks(cmd_tbl_t *cmdtp, int flag, int argc,
|
int do_vf610_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("cpu clock : %8d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
|
printf("cpu clock : %8d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <env.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <asm/arch/fsl_serdes.h>
|
#include <asm/arch/fsl_serdes.h>
|
||||||
|
@ -260,7 +260,7 @@ int cpu_status(u32 nr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cpu_release(u32 nr, int argc, char * const argv[])
|
int cpu_release(u32 nr, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
u64 boot_addr;
|
u64 boot_addr;
|
||||||
u64 *table = (u64 *)get_spin_tbl_addr();
|
u64 *table = (u64 *)get_spin_tbl_addr();
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#define MXC_CLK32 32768
|
#define MXC_CLK32 32768
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct cmd_tbl_s;
|
struct cmd_tbl;
|
||||||
|
|
||||||
enum mxc_clock {
|
enum mxc_clock {
|
||||||
MXC_ARM_CLK = 0,
|
MXC_ARM_CLK = 0,
|
||||||
@ -82,6 +82,6 @@ void enable_thermal_clk(void);
|
|||||||
void mxs_set_lcdclk(u32 base_addr, u32 freq);
|
void mxs_set_lcdclk(u32 base_addr, u32 freq);
|
||||||
void select_ldb_di_clock_source(enum ldb_di_clock clk);
|
void select_ldb_di_clock_source(enum ldb_di_clock clk);
|
||||||
void enable_eim_clk(unsigned char enable);
|
void enable_eim_clk(unsigned char enable);
|
||||||
int do_mx6_showclocks(struct cmd_tbl_s *cmdtp, int flag, int argc,
|
int do_mx6_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[]);
|
char *const argv[]);
|
||||||
#endif /* __ASM_ARCH_CLOCK_H */
|
#endif /* __ASM_ARCH_CLOCK_H */
|
||||||
|
@ -422,7 +422,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
|
|||||||
* DIFFERENCE: Instead of calling prep and go at the end
|
* DIFFERENCE: Instead of calling prep and go at the end
|
||||||
* they are called if subcommand is equal 0.
|
* they are called if subcommand is equal 0.
|
||||||
*/
|
*/
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[],
|
int do_bootm_linux(int flag, int argc, char *const argv[],
|
||||||
bootm_headers_t *images)
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
/* No need for those on ARM */
|
/* No need for those on ARM */
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
* instructions, otherwise a fault occurs."
|
* instructions, otherwise a fault occurs."
|
||||||
*/
|
*/
|
||||||
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
|
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
|
||||||
int argc, char * const argv[])
|
int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
ulong addr = (ulong)entry | 1;
|
ulong addr = (ulong)entry | 1;
|
||||||
entry = (void *)addr;
|
entry = (void *)addr;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
#include <irq_func.h>
|
#include <irq_func.h>
|
||||||
|
|
||||||
@ -28,11 +29,11 @@ __weak void reset_misc(void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
puts ("resetting ...\n");
|
puts ("resetting ...\n");
|
||||||
|
|
||||||
udelay (50000); /* wait 50 ms */
|
mdelay(50); /* wait 50 ms */
|
||||||
|
|
||||||
disable_interrupts();
|
disable_interrupts();
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
|
#include <env.h>
|
||||||
|
|
||||||
#define SYSOPEN 0x01
|
#define SYSOPEN 0x01
|
||||||
#define SYSCLOSE 0x02
|
#define SYSCLOSE 0x02
|
||||||
@ -180,7 +181,8 @@ static int smh_load_file(const char * const name, ulong load_addr,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_smhload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_smhload(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
if (argc == 3 || argc == 4) {
|
if (argc == 3 || argc == 4) {
|
||||||
ulong load_addr;
|
ulong load_addr;
|
||||||
|
@ -54,8 +54,8 @@ static int create_usage(char *dest)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_boot_mode(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_boot_mode(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
const struct boot_mode *p;
|
const struct boot_mode *p;
|
||||||
int reset_requested = 1;
|
int reset_requested = 1;
|
||||||
@ -87,7 +87,7 @@ void add_board_boot_modes(const struct boot_mode *p)
|
|||||||
int size;
|
int size;
|
||||||
char *dest;
|
char *dest;
|
||||||
|
|
||||||
cmd_tbl_t *entry = ll_entry_get(cmd_tbl_t, bmode, cmd);
|
struct cmd_tbl *entry = ll_entry_get(struct cmd_tbl, bmode, cmd);
|
||||||
|
|
||||||
if (entry->usage) {
|
if (entry->usage) {
|
||||||
free(entry->usage);
|
free(entry->usage);
|
||||||
|
@ -54,7 +54,8 @@ static int blob_encap_dek(const u8 *src, u8 *dst, u32 len)
|
|||||||
* Returns zero on success, CMD_RET_USAGE in case of misuse and negative
|
* Returns zero on success, CMD_RET_USAGE in case of misuse and negative
|
||||||
* on error.
|
* on error.
|
||||||
*/
|
*/
|
||||||
static int do_dek_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
static int do_dek_blob(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
uint32_t src_addr, dst_addr, len;
|
uint32_t src_addr, dst_addr, len;
|
||||||
uint8_t *src_ptr, *dst_ptr;
|
uint8_t *src_ptr, *dst_ptr;
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
* Copyright (C) 2012 Boundary Devices Inc.
|
* Copyright (C) 2012 Boundary Devices Inc.
|
||||||
*/
|
*/
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <asm/arch/imx-regs.h>
|
#include <asm/arch/imx-regs.h>
|
||||||
#include <asm/arch/mxc_hdmi.h>
|
#include <asm/arch/mxc_hdmi.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
static int do_hdmidet(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_hdmidet(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
|
struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
|
||||||
return (readb(&hdmi->phy_stat0) & HDMI_DVI_STAT) ? 0 : 1;
|
return (readb(&hdmi->phy_stat0) & HDMI_DVI_STAT) ? 0 : 1;
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <nand.h>
|
#include <nand.h>
|
||||||
#include <dm/devres.h>
|
#include <dm/devres.h>
|
||||||
@ -1048,7 +1049,7 @@ err:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_nandbcb_bcbonly(int argc, char * const argv[])
|
static int do_nandbcb_bcbonly(int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
struct fcb_block *fcb;
|
struct fcb_block *fcb;
|
||||||
struct dbbt_block *dbbt;
|
struct dbbt_block *dbbt;
|
||||||
@ -1458,8 +1459,8 @@ static int do_nandbcb_init(int argc, char * const argv[])
|
|||||||
return ret == 0 ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
|
return ret == 0 ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_nandbcb(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_nandbcb(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
const char *cmd;
|
const char *cmd;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <fuse.h>
|
#include <fuse.h>
|
||||||
#include <mapmem.h>
|
#include <mapmem.h>
|
||||||
@ -291,8 +292,8 @@ static int get_hab_status(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_hab_status(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_hab_status(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
if ((argc != 1)) {
|
if ((argc != 1)) {
|
||||||
cmd_usage(cmdtp);
|
cmd_usage(cmdtp);
|
||||||
@ -324,8 +325,8 @@ static ulong get_image_ivt_offset(ulong img_addr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_authenticate_image(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
ulong addr, length, ivt_offset;
|
ulong addr, length, ivt_offset;
|
||||||
int rcode = 0;
|
int rcode = 0;
|
||||||
@ -349,8 +350,8 @@ static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||||||
return rcode;
|
return rcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_hab_failsafe(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
hab_rvt_failsafe_t *hab_rvt_failsafe;
|
hab_rvt_failsafe_t *hab_rvt_failsafe;
|
||||||
|
|
||||||
@ -365,8 +366,8 @@ static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_hab_version(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
struct hab_hdr *hdr = (struct hab_hdr *)HAB_RVT_BASE;
|
struct hab_hdr *hdr = (struct hab_hdr *)HAB_RVT_BASE;
|
||||||
|
|
||||||
@ -380,8 +381,8 @@ static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_authenticate_image_or_failover(cmd_tbl_t *cmdtp, int flag,
|
static int do_authenticate_image_or_failover(struct cmd_tbl *cmdtp, int flag,
|
||||||
int argc, char * const argv[])
|
int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
int ret = CMD_RET_FAILURE;
|
int ret = CMD_RET_FAILURE;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/sci/sci.h>
|
#include <asm/arch/sci/sci.h>
|
||||||
@ -149,8 +150,8 @@ exit:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_authenticate(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_authenticate(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
ulong addr;
|
ulong addr;
|
||||||
|
|
||||||
@ -250,8 +251,8 @@ static void display_ahab_auth_event(u32 event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_ahab_status(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_ahab_status(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
u8 idx = 0U;
|
u8 idx = 0U;
|
||||||
@ -297,8 +298,8 @@ static int confirm_close(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_ahab_close(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_ahab_close(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
u16 lc;
|
u16 lc;
|
||||||
|
@ -626,7 +626,8 @@ static char snvs_cfg_help_text[] =
|
|||||||
"ALL values should be in hexadecimal format";
|
"ALL values should be in hexadecimal format";
|
||||||
|
|
||||||
#define NB_REGISTERS 18
|
#define NB_REGISTERS 18
|
||||||
static int do_snvs_cfg(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
static int do_snvs_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
u32 idx = 0;
|
u32 idx = 0;
|
||||||
@ -677,7 +678,7 @@ static char snvs_dgo_cfg_help_text[] =
|
|||||||
"\n"
|
"\n"
|
||||||
"ALL values should be in hexadecimal format";
|
"ALL values should be in hexadecimal format";
|
||||||
|
|
||||||
static int do_snvs_dgo_cfg(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_snvs_dgo_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
@ -713,7 +714,7 @@ static char tamper_pin_cfg_help_text[] =
|
|||||||
"\n"
|
"\n"
|
||||||
"ALL values should be in hexadecimal format";
|
"ALL values should be in hexadecimal format";
|
||||||
|
|
||||||
static int do_tamper_pin_cfg(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_tamper_pin_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
@ -748,7 +749,7 @@ static char snvs_clear_status_help_text[] =
|
|||||||
"Write the status registers with the value provided,"
|
"Write the status registers with the value provided,"
|
||||||
" clearing the status";
|
" clearing the status";
|
||||||
|
|
||||||
static int do_snvs_clear_status(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_snvs_clear_status(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int scierr = 0;
|
int scierr = 0;
|
||||||
@ -788,7 +789,7 @@ static char snvs_sec_status_help_text[] =
|
|||||||
"snvs_sec_status\n"
|
"snvs_sec_status\n"
|
||||||
"Display information about the security related to tamper and secvio";
|
"Display information about the security related to tamper and secvio";
|
||||||
|
|
||||||
static int do_snvs_sec_status(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_snvs_sec_status(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int scierr;
|
int scierr;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <asm/arch/clock.h>
|
#include <asm/arch/clock.h>
|
||||||
#include <asm/arch/imx-regs.h>
|
#include <asm/arch/imx-regs.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
@ -755,8 +756,8 @@ int clock_init(void)
|
|||||||
* Dump some clockes.
|
* Dump some clockes.
|
||||||
*/
|
*/
|
||||||
#ifndef CONFIG_SPL_BUILD
|
#ifndef CONFIG_SPL_BUILD
|
||||||
static int do_imx8m_showclocks(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_imx8m_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
u32 freq;
|
u32 freq;
|
||||||
|
|
||||||
|
@ -92,7 +92,8 @@ int arch_auxiliary_core_check_up(u32 core_id)
|
|||||||
* The TCMUL is mapped to (M4_BOOTROM_BASE_ADDR) at A core side for
|
* The TCMUL is mapped to (M4_BOOTROM_BASE_ADDR) at A core side for
|
||||||
* accessing the M4 TCMUL.
|
* accessing the M4 TCMUL.
|
||||||
*/
|
*/
|
||||||
static int do_bootaux(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_bootaux(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
ulong addr;
|
ulong addr;
|
||||||
int ret, up;
|
int ret, up;
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <asm/arch/imx-regs.h>
|
#include <asm/arch/imx-regs.h>
|
||||||
@ -943,7 +944,8 @@ void mxc_set_sata_internal_clock(void)
|
|||||||
/*
|
/*
|
||||||
* Dump some core clockes.
|
* Dump some core clockes.
|
||||||
*/
|
*/
|
||||||
static int do_mx5_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_mx5_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
u32 freq;
|
u32 freq;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <div64.h>
|
#include <div64.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
@ -1305,7 +1306,8 @@ void disable_ipu_clock(void)
|
|||||||
/*
|
/*
|
||||||
* Dump some core clockes.
|
* Dump some core clockes.
|
||||||
*/
|
*/
|
||||||
int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_mx6_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
u32 freq;
|
u32 freq;
|
||||||
freq = decode_pll(PLL_SYS, MXC_HCLK);
|
freq = decode_pll(PLL_SYS, MXC_HCLK);
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <clock_legacy.h>
|
#include <clock_legacy.h>
|
||||||
|
#include <command.h>
|
||||||
#include <div64.h>
|
#include <div64.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
@ -1100,7 +1101,8 @@ void epdc_clock_disable(void)
|
|||||||
/*
|
/*
|
||||||
* Dump some core clockes.
|
* Dump some core clockes.
|
||||||
*/
|
*/
|
||||||
int do_mx7_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_mx7_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
u32 freq;
|
u32 freq;
|
||||||
freq = decode_pll(PLL_CORE, MXC_HCLK);
|
freq = decode_pll(PLL_CORE, MXC_HCLK);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <clock_legacy.h>
|
#include <clock_legacy.h>
|
||||||
|
#include <command.h>
|
||||||
#include <div64.h>
|
#include <div64.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -329,7 +330,8 @@ void hab_caam_clock_enable(unsigned char enable)
|
|||||||
/*
|
/*
|
||||||
* Dump some core clockes.
|
* Dump some core clockes.
|
||||||
*/
|
*/
|
||||||
int do_mx7_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_mx7_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
u32 addr = 0;
|
u32 addr = 0;
|
||||||
u32 freq;
|
u32 freq;
|
||||||
|
@ -19,7 +19,7 @@ struct pll_init_data cmd_pll_data = {
|
|||||||
.pll_od = 2,
|
.pll_od = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
int do_pll_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_pll_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
if (argc != 5)
|
if (argc != 5)
|
||||||
goto pll_cmd_usage;
|
goto pll_cmd_usage;
|
||||||
@ -63,7 +63,8 @@ U_BOOT_CMD(
|
|||||||
PLLSET_CMD_LIST " <mult> <div> <OD>\n"
|
PLLSET_CMD_LIST " <mult> <div> <OD>\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
int do_getclk_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_getclk_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
unsigned int clk;
|
unsigned int clk;
|
||||||
unsigned long freq;
|
unsigned long freq;
|
||||||
@ -92,7 +93,7 @@ U_BOOT_CMD(
|
|||||||
CLOCK_INDEXES_LIST
|
CLOCK_INDEXES_LIST
|
||||||
);
|
);
|
||||||
|
|
||||||
int do_psc_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_psc_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
int psc_module;
|
int psc_module;
|
||||||
int res;
|
int res;
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
#include <mach/mon.h>
|
#include <mach/mon.h>
|
||||||
asm(".arch_extension sec\n\t");
|
asm(".arch_extension sec\n\t");
|
||||||
|
|
||||||
static int do_mon_install(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_mon_install(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
u32 addr, dpsc_base = 0x1E80000, freq, load_addr, size;
|
u32 addr, dpsc_base = 0x1E80000, freq, load_addr, size;
|
||||||
int rcode = 0;
|
int rcode = 0;
|
||||||
@ -65,8 +65,8 @@ static void core_spin(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_mon_power(cmd_tbl_t *cmdtp, int flag, int argc,
|
int do_mon_power(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int rcode = 0, core_id, on;
|
int rcode = 0, core_id, on;
|
||||||
void (*fn)(void);
|
void (*fn)(void);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <asm/arch/psc_defs.h>
|
#include <asm/arch/psc_defs.h>
|
||||||
#include <asm/arch/hardware.h>
|
#include <asm/arch/hardware.h>
|
||||||
|
|
||||||
int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
mon_power_off(0);
|
mon_power_off(0);
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
|
#include <env.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/arch/msmc.h>
|
#include <asm/arch/msmc.h>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <env.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/psc_defs.h>
|
#include <asm/arch/psc_defs.h>
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
|
#include <env.h>
|
||||||
#include <asm/arch/sm.h>
|
#include <asm/arch/sm.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
@ -117,7 +119,7 @@ int meson_sm_get_reboot_reason(void)
|
|||||||
return FIELD_GET(REBOOT_REASON_MASK, reason);
|
return FIELD_GET(REBOOT_REASON_MASK, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_sm_serial(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_sm_serial(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
ulong address;
|
ulong address;
|
||||||
@ -153,7 +155,7 @@ static const char *reboot_reasons[MAX_REBOOT_REASONS] = {
|
|||||||
[REBOOT_REASON_WATCHDOG_REBOOT] = "watchdog_reboot",
|
[REBOOT_REASON_WATCHDOG_REBOOT] = "watchdog_reboot",
|
||||||
};
|
};
|
||||||
|
|
||||||
static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_sm_reboot_reason(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
const char *reason_str;
|
const char *reason_str;
|
||||||
@ -181,15 +183,15 @@ static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||||||
return CMD_RET_SUCCESS;
|
return CMD_RET_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cmd_tbl_t cmd_sm_sub[] = {
|
static struct cmd_tbl cmd_sm_sub[] = {
|
||||||
U_BOOT_CMD_MKENT(serial, 2, 1, do_sm_serial, "", ""),
|
U_BOOT_CMD_MKENT(serial, 2, 1, do_sm_serial, "", ""),
|
||||||
U_BOOT_CMD_MKENT(reboot_reason, 1, 1, do_sm_reboot_reason, "", ""),
|
U_BOOT_CMD_MKENT(reboot_reason, 1, 1, do_sm_reboot_reason, "", ""),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int do_sm(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_sm(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
cmd_tbl_t *c;
|
struct cmd_tbl *c;
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
return CMD_RET_USAGE;
|
return CMD_RET_USAGE;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <spl.h>
|
#include <spl.h>
|
||||||
@ -280,7 +281,8 @@ void abort(void)
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* OMAP3 specific command to switch between NAND HW and SW ecc
|
* OMAP3 specific command to switch between NAND HW and SW ecc
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
static int do_switch_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
|
static int do_switch_ecc(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int hw, strength = 1;
|
int hw, strength = 1;
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
#include <hang.h>
|
#include <hang.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <adc.h>
|
#include <adc.h>
|
||||||
|
#include <command.h>
|
||||||
|
#include <env.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch-rockchip/boot_mode.h>
|
#include <asm/arch-rockchip/boot_mode.h>
|
||||||
#include <dm/device.h>
|
#include <dm/device.h>
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <env.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch-rockchip/clock.h>
|
#include <asm/arch-rockchip/clock.h>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* Copyright (c) 2016 Rockchip Electronics Co., Ltd
|
* Copyright (c) 2016 Rockchip Electronics Co., Ltd
|
||||||
*/
|
*/
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
#include <clk.h>
|
#include <clk.h>
|
||||||
@ -114,8 +115,8 @@ int rk_board_late_init(void)
|
|||||||
return rk3288_board_late_init();
|
return rk3288_board_late_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_clock(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_clock(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
static const struct {
|
static const struct {
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <wait_bit.h>
|
#include <wait_bit.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
@ -62,7 +63,8 @@ int set_cpu_clk_info(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_SPL_BUILD
|
#ifndef CONFIG_SPL_BUILD
|
||||||
static int do_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
cm_print_clock_quick_summary();
|
cm_print_clock_quick_summary();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
#include <hang.h>
|
#include <hang.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
@ -178,7 +179,8 @@ int arch_cpu_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_SPL_BUILD
|
#ifndef CONFIG_SPL_BUILD
|
||||||
static int do_bridge(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_bridge(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
unsigned int mask = ~0;
|
unsigned int mask = ~0;
|
||||||
|
|
||||||
|
@ -66,8 +66,8 @@ static int confirm_prog(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_stm32key(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_stm32key(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
u32 addr;
|
u32 addr;
|
||||||
const char *op = argc >= 2 ? argv[1] : NULL;
|
const char *op = argc >= 2 ? argv[1] : NULL;
|
||||||
|
@ -38,7 +38,7 @@ static void enable_vidconsole(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_stm32prog(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char * const argv[])
|
||||||
{
|
{
|
||||||
ulong addr, size;
|
ulong addr, size;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2020, STMicroelectronics - All Rights Reserved
|
* Copyright (C) 2020, STMicroelectronics - All Rights Reserved
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <command.h>
|
||||||
#include <console.h>
|
#include <console.h>
|
||||||
#include <dfu.h>
|
#include <dfu.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
@ -25,13 +25,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
#include <irq_func.h>
|
#include <irq_func.h>
|
||||||
#include <asm/arch/tegra.h>
|
#include <asm/arch/tegra.h>
|
||||||
#include <asm/arch-tegra/pmc.h>
|
#include <asm/arch-tegra/pmc.h>
|
||||||
|
|
||||||
static int do_enterrcm(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_enterrcm(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
puts("Entering RCM...\n");
|
puts("Entering RCM...\n");
|
||||||
udelay(50000);
|
udelay(50000);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <spl.h>
|
#include <spl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
@ -205,7 +206,8 @@ int uniphier_boot_from_backend(void)
|
|||||||
|
|
||||||
#ifndef CONFIG_SPL_BUILD
|
#ifndef CONFIG_SPL_BUILD
|
||||||
|
|
||||||
static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_pinmon(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
const struct uniphier_boot_device_info *info;
|
const struct uniphier_boot_device_info *info;
|
||||||
u32 pinmon;
|
u32 pinmon;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/printk.h>
|
#include <linux/printk.h>
|
||||||
@ -291,7 +292,8 @@ static void reg_dump(const struct uniphier_ddrmphy_param *param)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_ddrm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_ddrm(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
const struct uniphier_ddrmphy_param *param;
|
const struct uniphier_ddrmphy_param *param;
|
||||||
char *cmd;
|
char *cmd;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/printk.h>
|
#include <linux/printk.h>
|
||||||
@ -261,7 +262,8 @@ static void reg_dump(const struct uniphier_ddrphy_param *param)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_ddr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_ddr(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
const struct uniphier_ddrphy_param *param;
|
const struct uniphier_ddrphy_param *param;
|
||||||
char *cmd;
|
char *cmd;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
#include <mmc.h>
|
#include <mmc.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
@ -28,7 +29,8 @@ int mmc_get_env_dev(void)
|
|||||||
return find_first_mmc_device(false);
|
return find_first_mmc_device(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_mmcsetn(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_mmcsetn(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int dev;
|
int dev;
|
||||||
|
|
||||||
@ -46,7 +48,8 @@ U_BOOT_CMD(
|
|||||||
""
|
""
|
||||||
);
|
);
|
||||||
|
|
||||||
static int do_sdsetn(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_sdsetn(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int dev;
|
int dev;
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ void initialize_tcm(bool mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cpu_release(u32 nr, int argc, char * const argv[])
|
int cpu_release(u32 nr, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
if (nr >= ZYNQMP_CORE_APU0 && nr <= ZYNQMP_CORE_APU3) {
|
if (nr >= ZYNQMP_CORE_APU0 && nr <= ZYNQMP_CORE_APU3) {
|
||||||
u64 boot_addr = simple_strtoull(argv[0], NULL, 16);
|
u64 boot_addr = simple_strtoull(argv[0], NULL, 16);
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
rcm_t *rcm = (rcm_t *) (MMAP_RCM);
|
rcm_t *rcm = (rcm_t *) (MMAP_RCM);
|
||||||
udelay(1000);
|
udelay(1000);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
ccm_t *ccm = (ccm_t *) MMAP_CCM;
|
ccm_t *ccm = (ccm_t *) MMAP_CCM;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
#ifdef CONFIG_M5208
|
#ifdef CONFIG_M5208
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
rcm_t *rcm = (rcm_t *)(MMAP_RCM);
|
rcm_t *rcm = (rcm_t *)(MMAP_RCM);
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ int print_cpuinfo(void)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_DISPLAY_CPUINFO */
|
#endif /* CONFIG_DISPLAY_CPUINFO */
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
/* Call the board specific reset actions first. */
|
/* Call the board specific reset actions first. */
|
||||||
if(board_reset) {
|
if(board_reset) {
|
||||||
@ -175,7 +175,7 @@ int watchdog_init(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_M5272
|
#ifdef CONFIG_M5272
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
|
wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ int watchdog_init(void)
|
|||||||
#endif /* #ifdef CONFIG_M5272 */
|
#endif /* #ifdef CONFIG_M5272 */
|
||||||
|
|
||||||
#ifdef CONFIG_M5275
|
#ifdef CONFIG_M5275
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
rcm_t *rcm = (rcm_t *)(MMAP_RCM);
|
rcm_t *rcm = (rcm_t *)(MMAP_RCM);
|
||||||
|
|
||||||
@ -354,7 +354,7 @@ int print_cpuinfo(void)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_DISPLAY_CPUINFO */
|
#endif /* CONFIG_DISPLAY_CPUINFO */
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
MCFRESET_RCR = MCFRESET_RCR_SOFTRST;
|
MCFRESET_RCR = MCFRESET_RCR_SOFTRST;
|
||||||
return 0;
|
return 0;
|
||||||
@ -373,7 +373,7 @@ int print_cpuinfo(void)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_DISPLAY_CPUINFO */
|
#endif /* CONFIG_DISPLAY_CPUINFO */
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
/* enable watchdog, set timeout to 0 and wait */
|
/* enable watchdog, set timeout to 0 and wait */
|
||||||
mbar_writeByte(MCFSIM_SYPCR, 0xc0);
|
mbar_writeByte(MCFSIM_SYPCR, 0xc0);
|
||||||
@ -405,7 +405,7 @@ int print_cpuinfo(void)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_DISPLAY_CPUINFO */
|
#endif /* CONFIG_DISPLAY_CPUINFO */
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
/* enable watchdog, set timeout to 0 and wait */
|
/* enable watchdog, set timeout to 0 and wait */
|
||||||
mbar_writeByte(SIM_SYPCR, 0xc0);
|
mbar_writeByte(SIM_SYPCR, 0xc0);
|
||||||
|
@ -5,13 +5,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <vsprintf.h>
|
#include <vsprintf.h>
|
||||||
#include <asm/immap.h>
|
#include <asm/immap.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
#ifdef CONFIG_M5307
|
#ifdef CONFIG_M5307
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
sim_t *sim = (sim_t *)(MMAP_SIM);
|
sim_t *sim = (sim_t *)(MMAP_SIM);
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
rcm_t *rcm = (rcm_t *) (MMAP_RCM);
|
rcm_t *rcm = (rcm_t *) (MMAP_RCM);
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
rcm_t *rcm = (rcm_t *) (MMAP_RCM);
|
rcm_t *rcm = (rcm_t *) (MMAP_RCM);
|
||||||
udelay(1000);
|
udelay(1000);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
gptmr_t *gptmr = (gptmr_t *) (MMAP_GPTMR);
|
gptmr_t *gptmr = (gptmr_t *) (MMAP_GPTMR);
|
||||||
|
|
||||||
|
@ -49,7 +49,8 @@ void arch_lmb_reserve(struct lmb *lmb)
|
|||||||
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp));
|
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp));
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
|
int do_bootm_linux(int flag, int argc, char *const argv[],
|
||||||
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
bd_t *kbd;
|
bd_t *kbd;
|
||||||
|
@ -187,7 +187,7 @@ void interrupt_handler(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_IRQ)
|
#if defined(CONFIG_CMD_IRQ)
|
||||||
int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, const char *argv[])
|
int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct irq_action *act = vecs;
|
struct irq_action *act = vecs;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include <spl.h>
|
#include <spl.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
@ -48,7 +49,7 @@ int spl_start_uboot(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("mts rmsr, r0;" \
|
__asm__ __volatile__ ("mts rmsr, r0;" \
|
||||||
"bra r0");
|
"bra r0");
|
||||||
|
@ -108,7 +108,7 @@ static void boot_prep_linux(bootm_headers_t *images)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[],
|
int do_bootm_linux(int flag, int argc, char *const argv[],
|
||||||
bootm_headers_t *images)
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
images->cmdline_start = (ulong)env_get("bootargs");
|
images->cmdline_start = (ulong)env_get("bootargs");
|
||||||
|
@ -21,7 +21,7 @@ void __weak _machine_restart(void)
|
|||||||
/* NOP */;
|
/* NOP */;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
_machine_restart();
|
_machine_restart();
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ static void boot_jump_linux(bootm_headers_t *images)
|
|||||||
linux_extra);
|
linux_extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[],
|
int do_bootm_linux(int flag, int argc, char *const argv[],
|
||||||
bootm_headers_t *images)
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
/* No need for those on MIPS */
|
/* No need for those on MIPS */
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <clock_legacy.h>
|
#include <clock_legacy.h>
|
||||||
|
#include <command.h>
|
||||||
#include <hang.h>
|
#include <hang.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/addrspace.h>
|
#include <asm/addrspace.h>
|
||||||
@ -319,7 +320,8 @@ ulong get_ddr_freq(ulong dummy)
|
|||||||
return gd->mem_clk;
|
return gd->mem_clk;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_ar934x_showclk(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_ar934x_showclk(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
ar934x_update_clock();
|
ar934x_update_clock();
|
||||||
printf("CPU: %8ld MHz\n", gd->cpu_clk / 1000000);
|
printf("CPU: %8ld MHz\n", gd->cpu_clk / 1000000);
|
||||||
|
@ -39,7 +39,7 @@ int cleanup_before_linux(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
disable_interrupts();
|
disable_interrupts();
|
||||||
panic("AE3XX wdt not support yet.\n");
|
panic("AE3XX wdt not support yet.\n");
|
||||||
|
@ -39,7 +39,7 @@ int cleanup_before_linux(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
disable_interrupts();
|
disable_interrupts();
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <command.h>
|
#include <command.h>
|
||||||
|
|
||||||
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
|
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
|
||||||
int argc, char * const argv[])
|
int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
cleanup_before_linux();
|
cleanup_before_linux();
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <cpu.h>
|
#include <cpu.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
@ -31,7 +32,7 @@ int checkboard(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
disable_interrupts();
|
disable_interrupts();
|
||||||
/* indirect call to go beyond 256MB limitation of toolchain */
|
/* indirect call to go beyond 256MB limitation of toolchain */
|
||||||
|
@ -118,7 +118,7 @@ int interrupt_init(void)
|
|||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#if defined(CONFIG_CMD_IRQ)
|
#if defined(CONFIG_CMD_IRQ)
|
||||||
int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct irq_action *act = vecs;
|
struct irq_action *act = vecs;
|
||||||
|
@ -6,12 +6,14 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
|
#include <env.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include <irq_func.h>
|
#include <irq_func.h>
|
||||||
|
|
||||||
#define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
|
#define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
|
||||||
|
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
|
int do_bootm_linux(int flag, int argc, char *const argv[],
|
||||||
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
void (*kernel)(int, int, int, char *) = (void *)images->ep;
|
void (*kernel)(int, int, int, char *) = (void *)images->ep;
|
||||||
char *commandline = env_get("bootargs");
|
char *commandline = env_get("bootargs");
|
||||||
|
@ -123,8 +123,7 @@ int checkcpu(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SYSRESET
|
#ifndef CONFIG_SYSRESET
|
||||||
int
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
|
|
||||||
{
|
{
|
||||||
ulong msr;
|
ulong msr;
|
||||||
#ifndef MPC83xx_RESET
|
#ifndef MPC83xx_RESET
|
||||||
|
@ -96,7 +96,7 @@ void ecc_print_status(void)
|
|||||||
ddr->capture_attributes & ECC_CAPT_ATTR_VLD);
|
ddr->capture_attributes & ECC_CAPT_ATTR_VLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
|
int do_ecc(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
|
immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
|
||||||
#ifdef CONFIG_SYS_FSL_DDR2
|
#ifdef CONFIG_SYS_FSL_DDR2
|
||||||
|
@ -71,8 +71,8 @@ void timer_interrupt_cpu (struct pt_regs *regs)
|
|||||||
* irqinfo - print information about PCI devices
|
* irqinfo - print information about PCI devices
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void do_irqinfo(struct cmd_tbl *cmdtp, bd_t *bd, int flag, int argc,
|
||||||
do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,7 +523,8 @@ int get_serial_clock(void)
|
|||||||
return get_bus_freq(0);
|
return get_bus_freq(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_clocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_clocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
|
||||||
|
@ -129,7 +129,8 @@ static void check_erratum_a007212(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_errata(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
|
#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
|
||||||
extern int enable_cpu_a011_workaround;
|
extern int enable_cpu_a011_workaround;
|
||||||
|
@ -295,7 +295,7 @@ int checkcpu (void)
|
|||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
/* Everything after the first generation of PQ3 parts has RSTCR */
|
/* Everything after the first generation of PQ3 parts has RSTCR */
|
||||||
#if defined(CONFIG_ARCH_MPC8540) || defined(CONFIG_ARCH_MPC8541) || \
|
#if defined(CONFIG_ARCH_MPC8540) || defined(CONFIG_ARCH_MPC8541) || \
|
||||||
|
@ -102,7 +102,7 @@ void timer_interrupt_cpu(struct pt_regs *regs)
|
|||||||
|
|
||||||
#if defined(CONFIG_CMD_IRQ)
|
#if defined(CONFIG_CMD_IRQ)
|
||||||
/* irqinfo - print information about PCI devices,not implemented. */
|
/* irqinfo - print information about PCI devices,not implemented. */
|
||||||
int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ static u8 boot_entry_map[4] = {
|
|||||||
BOOT_ENTRY_R3_LOWER,
|
BOOT_ENTRY_R3_LOWER,
|
||||||
};
|
};
|
||||||
|
|
||||||
int cpu_release(u32 nr, int argc, char * const argv[])
|
int cpu_release(u32 nr, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
u32 i, val, *table = (u32 *)&__spin_table + nr * NUM_BOOT_ENTRY;
|
u32 i, val, *table = (u32 *)&__spin_table + nr * NUM_BOOT_ENTRY;
|
||||||
u64 boot_addr;
|
u64 boot_addr;
|
||||||
|
@ -107,7 +107,7 @@ checkcpu(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
|
volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
|
||||||
volatile ccsr_gur_t *gur = &immap->im_gur;
|
volatile ccsr_gur_t *gur = &immap->im_gur;
|
||||||
|
@ -100,7 +100,7 @@ void irq_free_handler(int vec)
|
|||||||
/*
|
/*
|
||||||
* irqinfo - print information about PCI devices,not implemented.
|
* irqinfo - print information about PCI devices,not implemented.
|
||||||
*/
|
*/
|
||||||
int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ int is_core_disabled(int nr) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cpu_release(u32 nr, int argc, char * const argv[])
|
int cpu_release(u32 nr, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
/* dummy function so common/cmd_mp.c will build
|
/* dummy function so common/cmd_mp.c will build
|
||||||
* should be implemented in the future */
|
* should be implemented in the future */
|
||||||
|
@ -195,7 +195,7 @@ void upmconfig(uint upm, uint *table, uint size)
|
|||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
ulong msr, addr;
|
ulong msr, addr;
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_siuinfo(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
||||||
sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
|
sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
|
||||||
@ -35,8 +36,8 @@ static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
|
static int do_memcinfo(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
||||||
memctl8xx_t __iomem *memctl = &immap->im_memctl;
|
memctl8xx_t __iomem *memctl = &immap->im_memctl;
|
||||||
@ -58,7 +59,8 @@ static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_carinfo(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
||||||
car8xx_t __iomem *car = &immap->im_clkrst;
|
car8xx_t __iomem *car = &immap->im_clkrst;
|
||||||
@ -119,7 +121,8 @@ static void binary(char *label, uint value, int nbits)
|
|||||||
#define PC_NBITS 12
|
#define PC_NBITS 12
|
||||||
#define PD_NBITS 13
|
#define PD_NBITS 13
|
||||||
|
|
||||||
static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_iopinfo(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
||||||
iop8xx_t __iomem *iop = &immap->im_ioport;
|
iop8xx_t __iomem *iop = &immap->im_ioport;
|
||||||
@ -172,7 +175,8 @@ static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
* this needs a clean up for smaller tighter code
|
* this needs a clean up for smaller tighter code
|
||||||
* use *uint and set the address based on cmd + port
|
* use *uint and set the address based on cmd + port
|
||||||
*/
|
*/
|
||||||
static int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_iopset(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
uint rcode = 0;
|
uint rcode = 0;
|
||||||
iopin_t iopin;
|
iopin_t iopin;
|
||||||
@ -328,7 +332,8 @@ static void prbrg(int n, uint val)
|
|||||||
putc('\n');
|
putc('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
static int do_brginfo(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
|
||||||
cpm8xx_t __iomem *cp = &immap->im_cpm;
|
cpm8xx_t __iomem *cp = &immap->im_cpm;
|
||||||
|
@ -232,8 +232,8 @@ static int boot_body_linux(bootm_headers_t *images)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
noinline
|
noinline int do_bootm_linux(int flag, int argc, char *const argv[],
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ kgdb_putregs(struct pt_regs *regs, char *buf, int length)
|
|||||||
the debugger. */
|
the debugger. */
|
||||||
|
|
||||||
void
|
void
|
||||||
kgdb_breakpoint(int argc, char * const argv[])
|
kgdb_breakpoint(int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
asm(" .globl breakinst\n\
|
asm(" .globl breakinst\n\
|
||||||
breakinst: .long 0x7d821008\n\
|
breakinst: .long 0x7d821008\n\
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <command.h>
|
#include <command.h>
|
||||||
|
|
||||||
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
|
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
|
||||||
int argc, char * const argv[])
|
int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
cleanup_before_linux();
|
cleanup_before_linux();
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[],
|
int do_bootm_linux(int flag, int argc, char *const argv[],
|
||||||
bootm_headers_t *images)
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
/* No need for those on RISC-V */
|
/* No need for those on RISC-V */
|
||||||
@ -128,7 +128,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_bootm_vxworks(int flag, int argc, char * const argv[],
|
int do_bootm_vxworks(int flag, int argc, char *const argv[],
|
||||||
bootm_headers_t *images)
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
return do_bootm_linux(flag, argc, argv, images);
|
return do_bootm_linux(flag, argc, argv, images);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <hang.h>
|
#include <hang.h>
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
printf("resetting ...\n");
|
printf("resetting ...\n");
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ int cleanup_before_linux (void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
disable_interrupts();
|
disable_interrupts();
|
||||||
reset_cpu(0);
|
reset_cpu(0);
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
|
#include <env.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include <asm/byteorder.h>
|
#include <asm/byteorder.h>
|
||||||
#include <asm/zimage.h>
|
#include <asm/zimage.h>
|
||||||
@ -50,7 +51,8 @@ static unsigned long sh_check_cmd_arg(char *cmdline, char *key, int base)
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
|
int do_bootm_linux(int flag, int argc, char *const argv[],
|
||||||
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
/* Linux kernel load address */
|
/* Linux kernel load address */
|
||||||
void (*kernel) (void) = (void (*)(void))images->ep;
|
void (*kernel) (void) = (void (*)(void))images->ep;
|
||||||
|
@ -10,11 +10,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
|
#include <env.h>
|
||||||
#include <irq_func.h>
|
#include <irq_func.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/zimage.h>
|
#include <asm/zimage.h>
|
||||||
|
|
||||||
int do_sh_zimageboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_sh_zimageboot(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
ulong (*zboot_entry)(int, char * const []) = NULL;
|
ulong (*zboot_entry)(int, char * const []) = NULL;
|
||||||
char *s0, *s1;
|
char *s0, *s1;
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#ifndef __FSP_VPD_H__
|
#ifndef __FSP_VPD_H__
|
||||||
#define __FSP_VPD_H__
|
#define __FSP_VPD_H__
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
struct __packed memory_upd {
|
struct __packed memory_upd {
|
||||||
u64 signature; /* Offset 0x0020 */
|
u64 signature; /* Offset 0x0020 */
|
||||||
u8 revision; /* Offset 0x0028 */
|
u8 revision; /* Offset 0x0028 */
|
||||||
|
@ -206,7 +206,7 @@ static int boot_jump_linux(bootm_headers_t *images)
|
|||||||
images->os.arch == IH_ARCH_X86_64);
|
images->os.arch == IH_ARCH_X86_64);
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[],
|
int do_bootm_linux(int flag, int argc, char *const argv[],
|
||||||
bootm_headers_t *images)
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
/* No need for those on x86 */
|
/* No need for those on x86 */
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
|
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
|
||||||
int argc, char * const argv[])
|
int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
unsigned long ret = 0;
|
unsigned long ret = 0;
|
||||||
char **argv_tmp;
|
char **argv_tmp;
|
||||||
|
@ -127,7 +127,7 @@ void do_irq(int hw_irq)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_IRQ)
|
#if defined(CONFIG_CMD_IRQ)
|
||||||
int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
#if !CONFIG_IS_ENABLED(X86_64)
|
#if !CONFIG_IS_ENABLED(X86_64)
|
||||||
int irq;
|
int irq;
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
#include <irq_func.h>
|
#include <irq_func.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
@ -310,7 +311,7 @@ void __setup_pcat_compatibility(void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
int do_zboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
struct boot_params *base_ptr;
|
struct boot_params *base_ptr;
|
||||||
void *bzImage_addr = NULL;
|
void *bzImage_addr = NULL;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
#include <div64.h>
|
#include <div64.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
@ -376,7 +377,8 @@ void get_arc_info(void)
|
|||||||
do_get_arc_info();
|
do_get_arc_info();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_arc_cmd(cmd_tbl_t * cmdtp, int flag, int argc, char *const argv[])
|
static int do_arc_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
const char *cmd;
|
const char *cmd;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
@ -226,7 +226,7 @@ int drv_video_init(void)
|
|||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO
|
#ifdef CONFIG_VIDEO
|
||||||
int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_brightness(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
int rcode = 0;
|
int rcode = 0;
|
||||||
ulong side;
|
ulong side;
|
||||||
|
@ -246,7 +246,8 @@ void reset_phy(void)
|
|||||||
#if defined(CONFIG_KIRKWOOD_GPIO)
|
#if defined(CONFIG_KIRKWOOD_GPIO)
|
||||||
/* Return GPIO push button status */
|
/* Return GPIO push button status */
|
||||||
static int
|
static int
|
||||||
do_read_push_button(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
do_read_push_button(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
char *const argv[])
|
||||||
{
|
{
|
||||||
return !kw_gpio_get_value(NET2BIG_V2_GPIO_PUSH_BUTTON);
|
return !kw_gpio_get_value(NET2BIG_V2_GPIO_PUSH_BUTTON);
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ void reset_phy(void)
|
|||||||
#if defined(CONFIG_KIRKWOOD_GPIO)
|
#if defined(CONFIG_KIRKWOOD_GPIO)
|
||||||
/* Return GPIO button status */
|
/* Return GPIO button status */
|
||||||
static int
|
static int
|
||||||
do_read_button(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
do_read_button(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
return kw_gpio_get_value(NETSPACE_V2_GPIO_BUTTON);
|
return kw_gpio_get_value(NETSPACE_V2_GPIO_BUTTON);
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <command.h>
|
||||||
#include <div64.h>
|
#include <div64.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
@ -21,7 +22,7 @@
|
|||||||
#define SYNO_CHKSUM_TAG "CHK="
|
#define SYNO_CHKSUM_TAG "CHK="
|
||||||
|
|
||||||
|
|
||||||
static int do_syno_populate(int argc, char * const argv[])
|
static int do_syno_populate(int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
unsigned int bus = CONFIG_SF_DEFAULT_BUS;
|
unsigned int bus = CONFIG_SF_DEFAULT_BUS;
|
||||||
unsigned int cs = CONFIG_SF_DEFAULT_CS;
|
unsigned int cs = CONFIG_SF_DEFAULT_CS;
|
||||||
@ -152,7 +153,7 @@ static const char * const pwr_mng_bit_func[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int do_syno_clk_gate(int argc, char * const argv[])
|
static int do_syno_clk_gate(int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
u32 pwr_mng_ctrl_reg = reg_read(POWER_MNG_CTRL_REG);
|
u32 pwr_mng_ctrl_reg = reg_read(POWER_MNG_CTRL_REG);
|
||||||
const char *func, *state;
|
const char *func, *state;
|
||||||
@ -195,8 +196,8 @@ static int do_syno_clk_gate(int argc, char * const argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_syno(cmd_tbl_t *cmdtp, int flag,
|
static int do_syno(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
int argc, char * const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
const char *cmd;
|
const char *cmd;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user