static int boot_mode;
-static const char *boot_flag_name(u32 flag)
-{
- flag -= SYS_KERNRL_REBOOT_FLAG;
- switch (flag) {
- case BOOT_NORMAL: return "NORMAL";
- case BOOT_LOADER: return "LOADER";
- case BOOT_MASKROM: return "MASKROM";
- case BOOT_RECOVER: return "RECOVER";
- case BOOT_NORECOVER: return "NORECOVER";
- case BOOT_SECONDOS: return "SECONDOS";
- case BOOT_WIPEDATA: return "WIPEDATA";
- case BOOT_WIPEALL: return "WIPEALL";
- case BOOT_CHECKIMG: return "CHECKIMG";
- case BOOT_FASTBOOT: return "FASTBOOT";
- default: return "";
- }
-}
-
-static const char *boot_mode_name(u32 mode)
-{
- switch (mode) {
- case BOOT_MODE_NORMAL: return "NORMAL";
- case BOOT_MODE_FACTORY2: return "FACTORY2";
- case BOOT_MODE_RECOVERY: return "RECOVERY";
- case BOOT_MODE_CHARGE: return "CHARGE";
- case BOOT_MODE_POWER_TEST: return "POWER_TEST";
- case BOOT_MODE_OFFMODE_CHARGING: return "OFFMODE_CHARGING";
- case BOOT_MODE_REBOOT: return "REBOOT";
- case BOOT_MODE_PANIC: return "PANIC";
- case BOOT_MODE_WATCHDOG: return "WATCHDOG";
- default: return "";
- }
-}
-
static void __init rk2928_boot_mode_init(void)
{
u32 boot_flag = readl_relaxed(RK2928_GRF_BASE + GRF_OS_REG4) | (readl_relaxed(RK2928_GRF_BASE + GRF_OS_REG5) << 16);
static int boot_mode;
-static const char *boot_flag_name(u32 flag)
-{
- flag -= SYS_KERNRL_REBOOT_FLAG;
- switch (flag) {
- case BOOT_NORMAL: return "NORMAL";
- case BOOT_LOADER: return "LOADER";
- case BOOT_MASKROM: return "MASKROM";
- case BOOT_RECOVER: return "RECOVER";
- case BOOT_NORECOVER: return "NORECOVER";
- case BOOT_SECONDOS: return "SECONDOS";
- case BOOT_WIPEDATA: return "WIPEDATA";
- case BOOT_WIPEALL: return "WIPEALL";
- case BOOT_CHECKIMG: return "CHECKIMG";
- case BOOT_FASTBOOT: return "FASTBOOT";
- default: return "";
- }
-}
-
-static const char *boot_mode_name(u32 mode)
-{
- switch (mode) {
- case BOOT_MODE_NORMAL: return "NORMAL";
- case BOOT_MODE_FACTORY2: return "FACTORY2";
- case BOOT_MODE_RECOVERY: return "RECOVERY";
- case BOOT_MODE_CHARGE: return "CHARGE";
- case BOOT_MODE_POWER_TEST: return "POWER_TEST";
- case BOOT_MODE_OFFMODE_CHARGING: return "OFFMODE_CHARGING";
- case BOOT_MODE_REBOOT: return "REBOOT";
- case BOOT_MODE_PANIC: return "PANIC";
- case BOOT_MODE_WATCHDOG: return "WATCHDOG";
- default: return "";
- }
-}
-
static void __init rk30_boot_mode_init(void)
{
u32 boot_flag = readl_relaxed(RK30_PMU_BASE + PMU_SYS_REG0);
#define BOOT_MODE_WATCHDOG 8
int board_boot_mode(void);
+static inline const char *boot_mode_name(u32 mode)
+{
+ switch (mode) {
+ case BOOT_MODE_NORMAL: return "NORMAL";
+ case BOOT_MODE_FACTORY2: return "FACTORY2";
+ case BOOT_MODE_RECOVERY: return "RECOVERY";
+ case BOOT_MODE_CHARGE: return "CHARGE";
+ case BOOT_MODE_POWER_TEST: return "POWER_TEST";
+ case BOOT_MODE_OFFMODE_CHARGING: return "OFFMODE_CHARGING";
+ case BOOT_MODE_REBOOT: return "REBOOT";
+ case BOOT_MODE_PANIC: return "PANIC";
+ case BOOT_MODE_WATCHDOG: return "WATCHDOG";
+ default: return "";
+ }
+}
+
/* for USB detection */
#if defined(CONFIG_USB_GADGET) && !defined(CONFIG_RK_USB_DETECT_BY_OTG_BVALID)
int __init board_usb_detect_init(unsigned gpio);
* For DDR frequency scaling setup. Board code something like this:
*
* This array _must_ be sorted in ascending frequency (without DDR_FREQ_*) order.
- * å¿\85é¡»æ\8c\89é¢\91ç\8e\87ï¼\88ä¸\8då¿\85è\80\83è\99\91DDR_FREQ_*ï¼\89é\80\92å¢\9eã\80? *static struct cpufreq_frequency_table dvfs_ddr_table[] = {
- * {.frequency = 200 * 1000 + DDR_FREQ_SUSPEND, .index = xxxx * 1000},
+ * static struct cpufreq_frequency_table dvfs_ddr_table[] = {
* {.frequency = 200 * 1000 + DDR_FREQ_IDLE, .index = xxxx * 1000},
* {.frequency = 300 * 1000 + DDR_FREQ_VIDEO, .index = xxxx * 1000},
* {.frequency = 400 * 1000 + DDR_FREQ_NORMAL, .index = xxxx * 1000},
BOOT_MAX /* MAX VALID BOOT TYPE.*/
};
+static inline const char *boot_flag_name(u32 flag)
+{
+ flag -= SYS_KERNRL_REBOOT_FLAG;
+ switch (flag) {
+ case BOOT_NORMAL: return "NORMAL";
+ case BOOT_LOADER: return "LOADER";
+ case BOOT_MASKROM: return "MASKROM";
+ case BOOT_RECOVER: return "RECOVER";
+ case BOOT_NORECOVER: return "NORECOVER";
+ case BOOT_SECONDOS: return "SECONDOS";
+ case BOOT_WIPEDATA: return "WIPEDATA";
+ case BOOT_WIPEALL: return "WIPEALL";
+ case BOOT_CHECKIMG: return "CHECKIMG";
+ case BOOT_FASTBOOT: return "FASTBOOT";
+ default: return "";
+ }
+}
+
#endif