NXP LPC32xx mach updates for v4.7
This includes a few nonfunctional clean-ups for NXP LPC32xx: * removed leftover from restart code migration to a watchdog driver * removed dead code leftovers from migration to CCF driver * fix double const qualifier -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABCAAGBQJXIo/gAAoJEKo94to8JTllBewP+gKeJmKR4DBWMyISqH/ZfqHm acpyL45BPcdmuhcUZhOyV4jxjpNDXvWkfshoAwDM87cy4qgA4UceGgdu8nfjvuF3 1DUvU4g6qbQJIp8h/uLHE4CiLhqTwuuu2i4YMbR6E+hEuWx2D7MLJQP1zqbA6d5E rl6AX1Bf6ajN5lZq8V0KSlvgP6N0Wew1h36D5APy0MCrijS1D9cMBOue1CyDh4pP Vfwfr3e8dMchtTQvoozoOQN1LW9xcBNkFifdzKLp+P20s5hiB+uBDkQ9VBQr3hKp YztdKJsYcHgZqUkNM54jQ3i+xxM1Inq8IaEQbqjTJyEf4LIpTTpEn93nGG/Nx3+T 4DKc+Ce2BI74qvqwt2seeNr722ftf6kCa37JpvfusaHotELMPB0GCrONgJPS9Udk g9zEAZrJ27zeFAfr7LA3Agywq3Lr1JhHndEodCcMxbBHY33HBFNlBqCWy8YqQyQv IsJGF1Z91xf8WXsEIzID3tCM7nb0c4/S2IEKamQAq98HG7dXOGsAgrJqqFiJEoN0 maeLt7UPIqxORjZk0k6uYC4nE5eZSlID4jKNJF2BB2orJs00z2AC5/H4dsZ488DI gcJd9rfIFGrzhCiFAiUnOz5CY1ZyxtCTdxvfvwIioPxy6MvizBR4G52EgyFA7rN+ d/8qYw5UCiLpf/ptDzkY =029c -----END PGP SIGNATURE----- Merge tag 'lpc32xx-soc-4.7' of git://github.com/vzapolskiy/linux-lpc32xx into next/soc Merge "NXP LPC32xx mach updates for v4.7" from Vladimir Zapolskiy: This includes a few nonfunctional clean-ups for NXP LPC32xx: * removed leftover from restart code migration to a watchdog driver * removed dead code leftovers from migration to CCF driver * fix double const qualifier * tag 'lpc32xx-soc-4.7' of git://github.com/vzapolskiy/linux-lpc32xx: ARM: lpc32xx: remove duplicate const on lpc32xx_auxdata_lookup ARM: lpc32xx: remove leftovers of legacy clock source and provider drivers ARM: lpc32xx: remove reboot header file
This commit is contained in:
commit
b65b98d9ac
@ -17,13 +17,6 @@
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c-pnx.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/system_info.h>
|
||||
@ -43,19 +36,6 @@ void lpc32xx_get_uid(u32 devid[4])
|
||||
devid[i] = __raw_readl(LPC32XX_CLKPWR_DEVID(i << 2));
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns SYSCLK source
|
||||
* 0 = PLL397, 1 = main oscillator
|
||||
*/
|
||||
int clk_is_sysclk_mainosc(void)
|
||||
{
|
||||
if ((__raw_readl(LPC32XX_CLKPWR_SYSCLK_CTRL) &
|
||||
LPC32XX_CLKPWR_SYSCTRL_SYSCLKMUX) == 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Detects and returns IRAM size for the device variation
|
||||
*/
|
||||
@ -87,81 +67,6 @@ u32 lpc32xx_return_iram_size(void)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(lpc32xx_return_iram_size);
|
||||
|
||||
/*
|
||||
* Computes PLL rate from PLL register and input clock
|
||||
*/
|
||||
u32 clk_check_pll_setup(u32 ifreq, struct clk_pll_setup *pllsetup)
|
||||
{
|
||||
u32 ilfreq, p, m, n, fcco, fref, cfreq;
|
||||
int mode;
|
||||
|
||||
/*
|
||||
* PLL requirements
|
||||
* ifreq must be >= 1MHz and <= 20MHz
|
||||
* FCCO must be >= 156MHz and <= 320MHz
|
||||
* FREF must be >= 1MHz and <= 27MHz
|
||||
* Assume the passed input data is not valid
|
||||
*/
|
||||
|
||||
ilfreq = ifreq;
|
||||
m = pllsetup->pll_m;
|
||||
n = pllsetup->pll_n;
|
||||
p = pllsetup->pll_p;
|
||||
|
||||
mode = (pllsetup->cco_bypass_b15 << 2) |
|
||||
(pllsetup->direct_output_b14 << 1) |
|
||||
pllsetup->fdbk_div_ctrl_b13;
|
||||
|
||||
switch (mode) {
|
||||
case 0x0: /* Non-integer mode */
|
||||
cfreq = (m * ilfreq) / (2 * p * n);
|
||||
fcco = (m * ilfreq) / n;
|
||||
fref = ilfreq / n;
|
||||
break;
|
||||
|
||||
case 0x1: /* integer mode */
|
||||
cfreq = (m * ilfreq) / n;
|
||||
fcco = (m * ilfreq) / (n * 2 * p);
|
||||
fref = ilfreq / n;
|
||||
break;
|
||||
|
||||
case 0x2:
|
||||
case 0x3: /* Direct mode */
|
||||
cfreq = (m * ilfreq) / n;
|
||||
fcco = cfreq;
|
||||
fref = ilfreq / n;
|
||||
break;
|
||||
|
||||
case 0x4:
|
||||
case 0x5: /* Bypass mode */
|
||||
cfreq = ilfreq / (2 * p);
|
||||
fcco = 156000000;
|
||||
fref = 1000000;
|
||||
break;
|
||||
|
||||
case 0x6:
|
||||
case 0x7: /* Direct bypass mode */
|
||||
default:
|
||||
cfreq = ilfreq;
|
||||
fcco = 156000000;
|
||||
fref = 1000000;
|
||||
break;
|
||||
}
|
||||
|
||||
if (fcco < 156000000 || fcco > 320000000)
|
||||
cfreq = 0;
|
||||
|
||||
if (fref < 1000000 || fref > 27000000)
|
||||
cfreq = 0;
|
||||
|
||||
return (u32) cfreq;
|
||||
}
|
||||
|
||||
u32 clk_get_pclk_div(void)
|
||||
{
|
||||
return 1 + ((__raw_readl(LPC32XX_CLKPWR_HCLK_DIV) >> 2) & 0x1F);
|
||||
}
|
||||
|
||||
static struct map_desc lpc32xx_io_desc[] __initdata = {
|
||||
{
|
||||
.virtual = (unsigned long)IO_ADDRESS(LPC32XX_AHB0_START),
|
||||
|
@ -19,37 +19,15 @@
|
||||
#ifndef __LPC32XX_COMMON_H
|
||||
#define __LPC32XX_COMMON_H
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
/*
|
||||
* Other arch specific structures and functions
|
||||
*/
|
||||
extern void lpc32xx_timer_init(void);
|
||||
extern void __init lpc32xx_init_irq(void);
|
||||
extern void __init lpc32xx_map_io(void);
|
||||
extern void __init lpc32xx_serial_init(void);
|
||||
|
||||
|
||||
/*
|
||||
* Structure used for setting up and querying the PLLS
|
||||
*/
|
||||
struct clk_pll_setup {
|
||||
int analog_on;
|
||||
int cco_bypass_b15;
|
||||
int direct_output_b14;
|
||||
int fdbk_div_ctrl_b13;
|
||||
int pll_p;
|
||||
int pll_n;
|
||||
u32 pll_m;
|
||||
};
|
||||
|
||||
extern int clk_is_sysclk_mainosc(void);
|
||||
extern u32 clk_check_pll_setup(u32 ifreq, struct clk_pll_setup *pllsetup);
|
||||
extern u32 clk_get_pllrate_from_reg(u32 inputclk, u32 regval);
|
||||
extern u32 clk_get_pclk_div(void);
|
||||
|
||||
/*
|
||||
* Returns the LPC32xx unique 128-bit chip ID
|
||||
*/
|
||||
|
@ -159,7 +159,7 @@ static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = {
|
||||
.dma_filter = pl08x_filter_id,
|
||||
};
|
||||
|
||||
static const struct of_dev_auxdata const lpc32xx_auxdata_lookup[] __initconst = {
|
||||
static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = {
|
||||
OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL),
|
||||
OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL),
|
||||
OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data),
|
||||
|
Loading…
Reference in New Issue
Block a user