mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-11-16 17:01:59 +00:00
Added MSL layer for MX53 with changes in MX51 for single kernel boot support. Added CCGR clocking changes. Fixed SDHC clock dependencies. Fix emi_intr clocks and fix warnings in clock code. Signed-off-by: Rob Herring <r.herring@freescale.com> Signed-off-by: Lily Zhang <r58066@freescale.com> Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com> Signed-off-by: Ranjani Vaidyanathan-RA5478 <Ranjani.Vaidyanathan@freescale.com> Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
98 lines
2.5 KiB
C
98 lines
2.5 KiB
C
/*
|
|
* Copyright 2004-2007, 2010 Freescale Semiconductor,
|
|
* Inc. All Rights Reserved.
|
|
*/
|
|
|
|
/*
|
|
* The code contained herein is licensed under the GNU General Public
|
|
* License. You may obtain a copy of the GNU General Public License
|
|
* Version 2 or later at the following locations:
|
|
*
|
|
* http://www.opensource.org/licenses/gpl-license.html
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/module.h>
|
|
#include <asm/setup.h>
|
|
#include <mach/common.h>
|
|
#include <mach/hardware.h>
|
|
|
|
extern int mxc_early_serial_console_init(unsigned long base, struct clk *clk);
|
|
|
|
/*!
|
|
* @file plat-mxc/cpu_common.c
|
|
*
|
|
* @brief This file contains the common CPU initialization code.
|
|
*
|
|
* @ingroup MSL_MX31 MSL_MXC91321
|
|
*/
|
|
|
|
static void __init system_rev_setup(char **p)
|
|
{
|
|
system_rev = simple_strtoul(*p, NULL, 16);
|
|
}
|
|
|
|
__early_param("system_rev=", system_rev_setup);
|
|
|
|
int mxc_jtag_enabled; /* OFF: 0 (default), ON: 1 */
|
|
int uart_at_24; /* OFF: 0 (default); ON: 1 */
|
|
/*
|
|
* Here are the JTAG options from the command line. By default JTAG
|
|
* is OFF which means JTAG is not connected and WFI is enabled
|
|
*
|
|
* "on" -- JTAG is connected, so WFI is disabled
|
|
* "off" -- JTAG is disconnected, so WFI is enabled
|
|
*/
|
|
|
|
static void __init jtag_wfi_setup(char **p)
|
|
{
|
|
if (memcmp(*p, "on", 2) == 0) {
|
|
mxc_jtag_enabled = 1;
|
|
*p += 2;
|
|
} else if (memcmp(*p, "off", 3) == 0) {
|
|
mxc_jtag_enabled = 0;
|
|
*p += 3;
|
|
}
|
|
}
|
|
|
|
static void __init uart_parent_setup(char **p)
|
|
{
|
|
if (memcmp(*p, "on", 2) == 0) {
|
|
/* set the UART parent clock to be lp-apm */
|
|
uart_at_24 = 1;
|
|
*p += 2;
|
|
} else if (memcmp(*p, "off", 3) == 0) {
|
|
uart_at_24 = 0;
|
|
*p += 3;
|
|
}
|
|
}
|
|
|
|
__early_param("jtag=", jtag_wfi_setup);
|
|
__early_param("debug_uart=", uart_parent_setup);
|
|
|
|
void __init mxc_cpu_common_init(void)
|
|
{
|
|
pr_info("CPU is %s%x Revision %u.%u\n",
|
|
(mxc_cpu() < 0x100) ? "i.MX" : "MXC",
|
|
mxc_cpu(), mxc_cpu_rev_major(), mxc_cpu_rev_minor());
|
|
}
|
|
|
|
/**
|
|
* early_console_setup - setup debugging console
|
|
*
|
|
* Consoles started here require little enough setup that we can start using
|
|
* them very early in the boot process, either right after the machine
|
|
* vector initialization, or even before if the drivers can detect their hw.
|
|
*
|
|
* Returns non-zero if a console couldn't be setup.
|
|
* This function is developed based on
|
|
* early_console_setup function as defined in arch/ia64/kernel/setup.c
|
|
*/
|
|
void __init early_console_setup(unsigned long base, struct clk *clk)
|
|
{
|
|
#ifdef CONFIG_SERIAL_MXC_CONSOLE
|
|
mxc_early_serial_console_init(base, clk);
|
|
#endif
|
|
}
|