You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel
Conflicts: arch/arm/mach-pxa/pxa25x.c
This commit is contained in:
@@ -624,6 +624,12 @@ proc_types:
|
|||||||
b __armv4_mmu_cache_off
|
b __armv4_mmu_cache_off
|
||||||
b __armv4_mmu_cache_flush
|
b __armv4_mmu_cache_flush
|
||||||
|
|
||||||
|
.word 0x56056930
|
||||||
|
.word 0xff0ffff0 @ PXA935
|
||||||
|
b __armv4_mmu_cache_on
|
||||||
|
b __armv4_mmu_cache_off
|
||||||
|
b __armv4_mmu_cache_flush
|
||||||
|
|
||||||
.word 0x56050000 @ Feroceon
|
.word 0x56050000 @ Feroceon
|
||||||
.word 0xff0f0000
|
.word 0xff0f0000
|
||||||
b __armv4_mmu_cache_on
|
b __armv4_mmu_cache_on
|
||||||
|
|||||||
@@ -1108,6 +1108,7 @@ void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf)
|
|||||||
locomo_writel(bpwf | LOCOMO_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
|
locomo_writel(bpwf | LOCOMO_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS);
|
||||||
spin_unlock_irqrestore(&lchip->lock, flags);
|
spin_unlock_irqrestore(&lchip->lock, flags);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(locomo_frontlight_set);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LoCoMo "Register Access Bus."
|
* LoCoMo "Register Access Bus."
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,9 @@ config CPU_PXA320
|
|||||||
config CPU_PXA930
|
config CPU_PXA930
|
||||||
bool "PXA930 (codename Tavor-P)"
|
bool "PXA930 (codename Tavor-P)"
|
||||||
|
|
||||||
|
config CPU_PXA935
|
||||||
|
bool "PXA935 (codename Tavor-P65)"
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
endif
|
endif
|
||||||
@@ -199,6 +202,10 @@ config MACH_E800
|
|||||||
config TRIZEPS_PXA
|
config TRIZEPS_PXA
|
||||||
bool "PXA based Keith und Koep Trizeps DIMM-Modules"
|
bool "PXA based Keith und Koep Trizeps DIMM-Modules"
|
||||||
|
|
||||||
|
config MACH_H5000
|
||||||
|
bool "HP iPAQ h5000"
|
||||||
|
select PXA25x
|
||||||
|
|
||||||
config MACH_TRIZEPS4
|
config MACH_TRIZEPS4
|
||||||
bool "Keith und Koep Trizeps4 DIMM-Module"
|
bool "Keith und Koep Trizeps4 DIMM-Module"
|
||||||
depends on TRIZEPS_PXA
|
depends on TRIZEPS_PXA
|
||||||
@@ -283,7 +290,6 @@ config MACH_MIOA701
|
|||||||
bool "Mitac Mio A701 Support"
|
bool "Mitac Mio A701 Support"
|
||||||
select PXA27x
|
select PXA27x
|
||||||
select IWMMXT
|
select IWMMXT
|
||||||
select LEDS_GPIO
|
|
||||||
select HAVE_PWM
|
select HAVE_PWM
|
||||||
select GPIO_SYSFS
|
select GPIO_SYSFS
|
||||||
help
|
help
|
||||||
@@ -396,6 +402,12 @@ config PXA27x
|
|||||||
help
|
help
|
||||||
Select code specific to PXA27x variants
|
Select code specific to PXA27x variants
|
||||||
|
|
||||||
|
config CPU_PXA26x
|
||||||
|
bool
|
||||||
|
select PXA25x
|
||||||
|
help
|
||||||
|
Select code specific to PXA26x (codename Dalhart)
|
||||||
|
|
||||||
config PXA3xx
|
config PXA3xx
|
||||||
bool
|
bool
|
||||||
select CPU_XSC3
|
select CPU_XSC3
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ obj-$(CONFIG_MACH_MP900C) += mp900.o
|
|||||||
obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
|
obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
|
||||||
obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o
|
obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o
|
||||||
obj-$(CONFIG_MACH_COLIBRI) += colibri.o
|
obj-$(CONFIG_MACH_COLIBRI) += colibri.o
|
||||||
|
obj-$(CONFIG_MACH_H5000) += h5000.o
|
||||||
obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o
|
obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o
|
||||||
obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o
|
obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o
|
||||||
obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o
|
obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#include <asm/clkdev.h>
|
#include <asm/clkdev.h>
|
||||||
#include <mach/pxa2xx-regs.h>
|
#include <mach/pxa2xx-regs.h>
|
||||||
#include <mach/pxa2xx-gpio.h>
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
|
|
||||||
#include "devices.h"
|
#include "devices.h"
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
#include <mach/mfp-pxa300.h>
|
#include <mach/mfp-pxa300.h>
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/gpio.h>
|
|
||||||
#include <mach/pxafb.h>
|
#include <mach/pxafb.h>
|
||||||
#include <mach/mmc.h>
|
#include <mach/mmc.h>
|
||||||
#include <mach/ohci.h>
|
#include <mach/ohci.h>
|
||||||
@@ -137,6 +136,10 @@ static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = {
|
|||||||
GPIO82_GPIO | MFP_PULL_HIGH, /* MMC CD */
|
GPIO82_GPIO | MFP_PULL_HIGH, /* MMC CD */
|
||||||
GPIO85_GPIO, /* MMC WP */
|
GPIO85_GPIO, /* MMC WP */
|
||||||
GPIO99_GPIO, /* Ethernet IRQ */
|
GPIO99_GPIO, /* Ethernet IRQ */
|
||||||
|
|
||||||
|
/* Standard I2C */
|
||||||
|
GPIO21_I2C_SCL,
|
||||||
|
GPIO22_I2C_SDA,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
|
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/pm.h>
|
#include <linux/pm.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/backlight.h>
|
#include <linux/backlight.h>
|
||||||
@@ -541,11 +542,42 @@ err_free_1:
|
|||||||
static inline void corgi_init_spi(void) {}
|
static inline void corgi_init_spi(void) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static struct mtd_partition sharpsl_rom_parts[] = {
|
||||||
|
{
|
||||||
|
.name ="Boot PROM Filesystem",
|
||||||
|
.offset = 0x00120000,
|
||||||
|
.size = MTDPART_SIZ_FULL,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct physmap_flash_data sharpsl_rom_data = {
|
||||||
|
.width = 2,
|
||||||
|
.nr_parts = ARRAY_SIZE(sharpsl_rom_parts),
|
||||||
|
.parts = sharpsl_rom_parts,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource sharpsl_rom_resources[] = {
|
||||||
|
{
|
||||||
|
.start = 0x00000000,
|
||||||
|
.end = 0x007fffff,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device sharpsl_rom_device = {
|
||||||
|
.name = "physmap-flash",
|
||||||
|
.id = -1,
|
||||||
|
.resource = sharpsl_rom_resources,
|
||||||
|
.num_resources = ARRAY_SIZE(sharpsl_rom_resources),
|
||||||
|
.dev.platform_data = &sharpsl_rom_data,
|
||||||
|
};
|
||||||
|
|
||||||
static struct platform_device *devices[] __initdata = {
|
static struct platform_device *devices[] __initdata = {
|
||||||
&corgiscoop_device,
|
&corgiscoop_device,
|
||||||
&corgifb_device,
|
&corgifb_device,
|
||||||
&corgikbd_device,
|
&corgikbd_device,
|
||||||
&corgiled_device,
|
&corgiled_device,
|
||||||
|
&sharpsl_rom_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void corgi_poweroff(void)
|
static void corgi_poweroff(void)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ typedef struct {
|
|||||||
|
|
||||||
/* Define the refresh period in mSec for the SDRAM and the number of rows */
|
/* Define the refresh period in mSec for the SDRAM and the number of rows */
|
||||||
#define SDRAM_TREF 64 /* standard 64ms SDRAM */
|
#define SDRAM_TREF 64 /* standard 64ms SDRAM */
|
||||||
#define SDRAM_ROWS 4096 /* 64MB=8192 32MB=4096 */
|
static unsigned int sdram_rows;
|
||||||
|
|
||||||
#define CCLKCFG_TURBO 0x1
|
#define CCLKCFG_TURBO 0x1
|
||||||
#define CCLKCFG_FCS 0x2
|
#define CCLKCFG_FCS 0x2
|
||||||
@@ -73,6 +73,9 @@ typedef struct {
|
|||||||
#define MDREFR_DB2_MASK (MDREFR_K2DB2 | MDREFR_K1DB2)
|
#define MDREFR_DB2_MASK (MDREFR_K2DB2 | MDREFR_K1DB2)
|
||||||
#define MDREFR_DRI_MASK 0xFFF
|
#define MDREFR_DRI_MASK 0xFFF
|
||||||
|
|
||||||
|
#define MDCNFG_DRAC2(mdcnfg) (((mdcnfg) >> 21) & 0x3)
|
||||||
|
#define MDCNFG_DRAC0(mdcnfg) (((mdcnfg) >> 5) & 0x3)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PXA255 definitions
|
* PXA255 definitions
|
||||||
*/
|
*/
|
||||||
@@ -109,6 +112,10 @@ static struct cpufreq_frequency_table
|
|||||||
static struct cpufreq_frequency_table
|
static struct cpufreq_frequency_table
|
||||||
pxa255_turbo_freq_table[NUM_PXA25x_TURBO_FREQS+1];
|
pxa255_turbo_freq_table[NUM_PXA25x_TURBO_FREQS+1];
|
||||||
|
|
||||||
|
static unsigned int pxa255_turbo_table;
|
||||||
|
module_param(pxa255_turbo_table, uint, 0);
|
||||||
|
MODULE_PARM_DESC(pxa255_turbo_table, "Selects the frequency table (0 = run table, !0 = turbo table)");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PXA270 definitions
|
* PXA270 definitions
|
||||||
*
|
*
|
||||||
@@ -158,22 +165,16 @@ static struct cpufreq_frequency_table
|
|||||||
|
|
||||||
extern unsigned get_clk_frequency_khz(int info);
|
extern unsigned get_clk_frequency_khz(int info);
|
||||||
|
|
||||||
static void find_freq_tables(struct cpufreq_policy *policy,
|
static void find_freq_tables(struct cpufreq_frequency_table **freq_table,
|
||||||
struct cpufreq_frequency_table **freq_table,
|
|
||||||
pxa_freqs_t **pxa_freqs)
|
pxa_freqs_t **pxa_freqs)
|
||||||
{
|
{
|
||||||
if (cpu_is_pxa25x()) {
|
if (cpu_is_pxa25x()) {
|
||||||
if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {
|
if (!pxa255_turbo_table) {
|
||||||
*pxa_freqs = pxa255_run_freqs;
|
*pxa_freqs = pxa255_run_freqs;
|
||||||
*freq_table = pxa255_run_freq_table;
|
*freq_table = pxa255_run_freq_table;
|
||||||
} else if (policy->policy == CPUFREQ_POLICY_POWERSAVE) {
|
} else {
|
||||||
*pxa_freqs = pxa255_turbo_freqs;
|
*pxa_freqs = pxa255_turbo_freqs;
|
||||||
*freq_table = pxa255_turbo_freq_table;
|
*freq_table = pxa255_turbo_freq_table;
|
||||||
} else {
|
|
||||||
printk("CPU PXA: Unknown policy found. "
|
|
||||||
"Using CPUFREQ_POLICY_PERFORMANCE\n");
|
|
||||||
*pxa_freqs = pxa255_run_freqs;
|
|
||||||
*freq_table = pxa255_run_freq_table;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cpu_is_pxa27x()) {
|
if (cpu_is_pxa27x()) {
|
||||||
@@ -194,14 +195,28 @@ static void pxa27x_guess_max_freq(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void init_sdram_rows(void)
|
||||||
|
{
|
||||||
|
uint32_t mdcnfg = MDCNFG;
|
||||||
|
unsigned int drac2 = 0, drac0 = 0;
|
||||||
|
|
||||||
|
if (mdcnfg & (MDCNFG_DE2 | MDCNFG_DE3))
|
||||||
|
drac2 = MDCNFG_DRAC2(mdcnfg);
|
||||||
|
|
||||||
|
if (mdcnfg & (MDCNFG_DE0 | MDCNFG_DE1))
|
||||||
|
drac0 = MDCNFG_DRAC0(mdcnfg);
|
||||||
|
|
||||||
|
sdram_rows = 1 << (11 + max(drac0, drac2));
|
||||||
|
}
|
||||||
|
|
||||||
static u32 mdrefr_dri(unsigned int freq)
|
static u32 mdrefr_dri(unsigned int freq)
|
||||||
{
|
{
|
||||||
u32 dri = 0;
|
u32 dri = 0;
|
||||||
|
|
||||||
if (cpu_is_pxa25x())
|
if (cpu_is_pxa25x())
|
||||||
dri = ((freq * SDRAM_TREF) / (SDRAM_ROWS * 32));
|
dri = ((freq * SDRAM_TREF) / (sdram_rows * 32));
|
||||||
if (cpu_is_pxa27x())
|
if (cpu_is_pxa27x())
|
||||||
dri = ((freq * SDRAM_TREF) / (SDRAM_ROWS - 31)) / 32;
|
dri = ((freq * SDRAM_TREF) / (sdram_rows - 31)) / 32;
|
||||||
return dri;
|
return dri;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +227,7 @@ static int pxa_verify_policy(struct cpufreq_policy *policy)
|
|||||||
pxa_freqs_t *pxa_freqs;
|
pxa_freqs_t *pxa_freqs;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
find_freq_tables(policy, &pxa_freqs_table, &pxa_freqs);
|
find_freq_tables(&pxa_freqs_table, &pxa_freqs);
|
||||||
ret = cpufreq_frequency_table_verify(policy, pxa_freqs_table);
|
ret = cpufreq_frequency_table_verify(policy, pxa_freqs_table);
|
||||||
|
|
||||||
if (freq_debug)
|
if (freq_debug)
|
||||||
@@ -240,7 +255,7 @@ static int pxa_set_target(struct cpufreq_policy *policy,
|
|||||||
unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg;
|
unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg;
|
||||||
|
|
||||||
/* Get the current policy */
|
/* Get the current policy */
|
||||||
find_freq_tables(policy, &pxa_freqs_table, &pxa_freq_settings);
|
find_freq_tables(&pxa_freqs_table, &pxa_freq_settings);
|
||||||
|
|
||||||
/* Lookup the next frequency */
|
/* Lookup the next frequency */
|
||||||
if (cpufreq_frequency_table_target(policy, pxa_freqs_table,
|
if (cpufreq_frequency_table_target(policy, pxa_freqs_table,
|
||||||
@@ -329,11 +344,15 @@ static __init int pxa_cpufreq_init(struct cpufreq_policy *policy)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
unsigned int freq;
|
unsigned int freq;
|
||||||
|
struct cpufreq_frequency_table *pxa255_freq_table;
|
||||||
|
pxa_freqs_t *pxa255_freqs;
|
||||||
|
|
||||||
/* try to guess pxa27x cpu */
|
/* try to guess pxa27x cpu */
|
||||||
if (cpu_is_pxa27x())
|
if (cpu_is_pxa27x())
|
||||||
pxa27x_guess_max_freq();
|
pxa27x_guess_max_freq();
|
||||||
|
|
||||||
|
init_sdram_rows();
|
||||||
|
|
||||||
/* set default policy and cpuinfo */
|
/* set default policy and cpuinfo */
|
||||||
policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
|
policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
|
||||||
policy->cur = get_clk_frequency_khz(0); /* current freq */
|
policy->cur = get_clk_frequency_khz(0); /* current freq */
|
||||||
@@ -354,6 +373,8 @@ static __init int pxa_cpufreq_init(struct cpufreq_policy *policy)
|
|||||||
}
|
}
|
||||||
pxa255_turbo_freq_table[i].frequency = CPUFREQ_TABLE_END;
|
pxa255_turbo_freq_table[i].frequency = CPUFREQ_TABLE_END;
|
||||||
|
|
||||||
|
pxa255_turbo_table = !!pxa255_turbo_table;
|
||||||
|
|
||||||
/* Generate the pxa27x cpufreq_frequency_table struct */
|
/* Generate the pxa27x cpufreq_frequency_table struct */
|
||||||
for (i = 0; i < NUM_PXA27x_FREQS; i++) {
|
for (i = 0; i < NUM_PXA27x_FREQS; i++) {
|
||||||
freq = pxa27x_freqs[i].khz;
|
freq = pxa27x_freqs[i].khz;
|
||||||
@@ -368,8 +389,12 @@ static __init int pxa_cpufreq_init(struct cpufreq_policy *policy)
|
|||||||
* Set the policy's minimum and maximum frequencies from the tables
|
* Set the policy's minimum and maximum frequencies from the tables
|
||||||
* just constructed. This sets cpuinfo.mxx_freq, min and max.
|
* just constructed. This sets cpuinfo.mxx_freq, min and max.
|
||||||
*/
|
*/
|
||||||
if (cpu_is_pxa25x())
|
if (cpu_is_pxa25x()) {
|
||||||
cpufreq_frequency_table_cpuinfo(policy, pxa255_run_freq_table);
|
find_freq_tables(&pxa255_freq_table, &pxa255_freqs);
|
||||||
|
pr_info("PXA255 cpufreq using %s frequency table\n",
|
||||||
|
pxa255_turbo_table ? "turbo" : "run");
|
||||||
|
cpufreq_frequency_table_cpuinfo(policy, pxa255_freq_table);
|
||||||
|
}
|
||||||
else if (cpu_is_pxa27x())
|
else if (cpu_is_pxa27x())
|
||||||
cpufreq_frequency_table_cpuinfo(policy, pxa27x_freq_table);
|
cpufreq_frequency_table_cpuinfo(policy, pxa27x_freq_table);
|
||||||
|
|
||||||
|
|||||||
+77
-18
@@ -4,13 +4,12 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
|
|
||||||
#include <mach/gpio.h>
|
#include <mach/pxa-regs.h>
|
||||||
#include <mach/udc.h>
|
#include <mach/udc.h>
|
||||||
#include <mach/pxafb.h>
|
#include <mach/pxafb.h>
|
||||||
#include <mach/mmc.h>
|
#include <mach/mmc.h>
|
||||||
#include <mach/irda.h>
|
#include <mach/irda.h>
|
||||||
#include <mach/i2c.h>
|
#include <mach/i2c.h>
|
||||||
#include <mach/mfp-pxa27x.h>
|
|
||||||
#include <mach/ohci.h>
|
#include <mach/ohci.h>
|
||||||
#include <mach/pxa27x_keypad.h>
|
#include <mach/pxa27x_keypad.h>
|
||||||
#include <mach/pxa2xx_spi.h>
|
#include <mach/pxa2xx_spi.h>
|
||||||
@@ -156,8 +155,8 @@ void __init set_pxa_fb_parent(struct device *parent_dev)
|
|||||||
|
|
||||||
static struct resource pxa_resource_ffuart[] = {
|
static struct resource pxa_resource_ffuart[] = {
|
||||||
{
|
{
|
||||||
.start = __PREG(FFUART),
|
.start = 0x40100000,
|
||||||
.end = __PREG(FFUART) + 35,
|
.end = 0x40100023,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.start = IRQ_FFUART,
|
.start = IRQ_FFUART,
|
||||||
@@ -175,8 +174,8 @@ struct platform_device pxa_device_ffuart= {
|
|||||||
|
|
||||||
static struct resource pxa_resource_btuart[] = {
|
static struct resource pxa_resource_btuart[] = {
|
||||||
{
|
{
|
||||||
.start = __PREG(BTUART),
|
.start = 0x40200000,
|
||||||
.end = __PREG(BTUART) + 35,
|
.end = 0x40200023,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.start = IRQ_BTUART,
|
.start = IRQ_BTUART,
|
||||||
@@ -194,8 +193,8 @@ struct platform_device pxa_device_btuart = {
|
|||||||
|
|
||||||
static struct resource pxa_resource_stuart[] = {
|
static struct resource pxa_resource_stuart[] = {
|
||||||
{
|
{
|
||||||
.start = __PREG(STUART),
|
.start = 0x40700000,
|
||||||
.end = __PREG(STUART) + 35,
|
.end = 0x40700023,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.start = IRQ_STUART,
|
.start = IRQ_STUART,
|
||||||
@@ -213,8 +212,8 @@ struct platform_device pxa_device_stuart = {
|
|||||||
|
|
||||||
static struct resource pxa_resource_hwuart[] = {
|
static struct resource pxa_resource_hwuart[] = {
|
||||||
{
|
{
|
||||||
.start = __PREG(HWUART),
|
.start = 0x41600000,
|
||||||
.end = __PREG(HWUART) + 47,
|
.end = 0x4160002F,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.start = IRQ_HWUART,
|
.start = IRQ_HWUART,
|
||||||
@@ -249,18 +248,53 @@ struct platform_device pxa_device_i2c = {
|
|||||||
.num_resources = ARRAY_SIZE(pxai2c_resources),
|
.num_resources = ARRAY_SIZE(pxai2c_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned long pxa27x_i2c_mfp_cfg[] = {
|
|
||||||
GPIO117_I2C_SCL,
|
|
||||||
GPIO118_I2C_SDA,
|
|
||||||
};
|
|
||||||
|
|
||||||
void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
|
void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
|
||||||
{
|
{
|
||||||
if (cpu_is_pxa27x())
|
|
||||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(pxa27x_i2c_mfp_cfg));
|
|
||||||
pxa_register_device(&pxa_device_i2c, info);
|
pxa_register_device(&pxa_device_i2c, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PXA27x
|
||||||
|
static struct resource pxa27x_resources_i2c_power[] = {
|
||||||
|
{
|
||||||
|
.start = 0x40f00180,
|
||||||
|
.end = 0x40f001a3,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
}, {
|
||||||
|
.start = IRQ_PWRI2C,
|
||||||
|
.end = IRQ_PWRI2C,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
struct platform_device pxa27x_device_i2c_power = {
|
||||||
|
.name = "pxa2xx-i2c",
|
||||||
|
.id = 1,
|
||||||
|
.resource = pxa27x_resources_i2c_power,
|
||||||
|
.num_resources = ARRAY_SIZE(pxa27x_resources_i2c_power),
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PXA3xx
|
||||||
|
static struct resource pxa3xx_resources_i2c_power[] = {
|
||||||
|
{
|
||||||
|
.start = 0x40f500c0,
|
||||||
|
.end = 0x40f500d3,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
}, {
|
||||||
|
.start = IRQ_PWRI2C,
|
||||||
|
.end = IRQ_PWRI2C,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
struct platform_device pxa3xx_device_i2c_power = {
|
||||||
|
.name = "pxa2xx-i2c",
|
||||||
|
.id = 1,
|
||||||
|
.resource = pxa3xx_resources_i2c_power,
|
||||||
|
.num_resources = ARRAY_SIZE(pxa3xx_resources_i2c_power),
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct resource pxai2s_resources[] = {
|
static struct resource pxai2s_resources[] = {
|
||||||
{
|
{
|
||||||
.start = 0x40400000,
|
.start = 0x40400000,
|
||||||
@@ -296,11 +330,36 @@ void __init pxa_set_ficp_info(struct pxaficp_platform_data *info)
|
|||||||
pxa_register_device(&pxa_device_ficp, info);
|
pxa_register_device(&pxa_device_ficp, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct platform_device pxa_device_rtc = {
|
static struct resource pxa_rtc_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = 0x40900000,
|
||||||
|
.end = 0x40900000 + 0x3b,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = IRQ_RTC1Hz,
|
||||||
|
.end = IRQ_RTC1Hz,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
[2] = {
|
||||||
|
.start = IRQ_RTCAlrm,
|
||||||
|
.end = IRQ_RTCAlrm,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
struct platform_device sa1100_device_rtc = {
|
||||||
.name = "sa1100-rtc",
|
.name = "sa1100-rtc",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct platform_device pxa_device_rtc = {
|
||||||
|
.name = "pxa-rtc",
|
||||||
|
.id = -1,
|
||||||
|
.num_resources = ARRAY_SIZE(pxa_rtc_resources),
|
||||||
|
.resource = pxa_rtc_resources,
|
||||||
|
};
|
||||||
|
|
||||||
static struct resource pxa_ac97_resources[] = {
|
static struct resource pxa_ac97_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = 0x40500000,
|
.start = 0x40500000,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ extern struct platform_device pxa_device_hwuart;
|
|||||||
extern struct platform_device pxa_device_i2c;
|
extern struct platform_device pxa_device_i2c;
|
||||||
extern struct platform_device pxa_device_i2s;
|
extern struct platform_device pxa_device_i2s;
|
||||||
extern struct platform_device pxa_device_ficp;
|
extern struct platform_device pxa_device_ficp;
|
||||||
|
extern struct platform_device sa1100_device_rtc;
|
||||||
extern struct platform_device pxa_device_rtc;
|
extern struct platform_device pxa_device_rtc;
|
||||||
extern struct platform_device pxa_device_ac97;
|
extern struct platform_device pxa_device_ac97;
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,10 @@ static unsigned long ezx_pin_config[] __initdata = {
|
|||||||
GPIO91_USB_P3_1, /* ICL_XRXD */
|
GPIO91_USB_P3_1, /* ICL_XRXD */
|
||||||
GPIO56_USB_P3_4, /* ICL_VMOUT */
|
GPIO56_USB_P3_4, /* ICL_VMOUT */
|
||||||
GPIO113_USB_P3_3, /* /ICL_VMIN */
|
GPIO113_USB_P3_3, /* /ICL_VMIN */
|
||||||
|
|
||||||
|
/* I2C */
|
||||||
|
GPIO117_I2C_SCL,
|
||||||
|
GPIO118_I2C_SDA,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init ezx_init(void)
|
static void __init ezx_init(void)
|
||||||
|
|||||||
+49
-10
@@ -25,6 +25,18 @@
|
|||||||
|
|
||||||
#include "generic.h"
|
#include "generic.h"
|
||||||
|
|
||||||
|
#define GPIO0_BASE ((void __iomem *)io_p2v(0x40E00000))
|
||||||
|
#define GPIO1_BASE ((void __iomem *)io_p2v(0x40E00004))
|
||||||
|
#define GPIO2_BASE ((void __iomem *)io_p2v(0x40E00008))
|
||||||
|
#define GPIO3_BASE ((void __iomem *)io_p2v(0x40E00100))
|
||||||
|
|
||||||
|
#define GPLR_OFFSET 0x00
|
||||||
|
#define GPDR_OFFSET 0x0C
|
||||||
|
#define GPSR_OFFSET 0x18
|
||||||
|
#define GPCR_OFFSET 0x24
|
||||||
|
#define GRER_OFFSET 0x30
|
||||||
|
#define GFER_OFFSET 0x3C
|
||||||
|
#define GEDR_OFFSET 0x48
|
||||||
|
|
||||||
struct pxa_gpio_chip {
|
struct pxa_gpio_chip {
|
||||||
struct gpio_chip chip;
|
struct gpio_chip chip;
|
||||||
@@ -33,6 +45,18 @@ struct pxa_gpio_chip {
|
|||||||
|
|
||||||
int pxa_last_gpio;
|
int pxa_last_gpio;
|
||||||
|
|
||||||
|
#ifdef CONFIG_CPU_PXA26x
|
||||||
|
/* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted,
|
||||||
|
* as well as their Alternate Function value being '1' for GPIO in GAFRx.
|
||||||
|
*/
|
||||||
|
static int __gpio_is_inverted(unsigned gpio)
|
||||||
|
{
|
||||||
|
return cpu_is_pxa25x() && gpio > 85;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define __gpio_is_inverted(gpio) (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Configure pins for GPIO or other functions
|
* Configure pins for GPIO or other functions
|
||||||
*/
|
*/
|
||||||
@@ -75,7 +99,10 @@ static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
|
|||||||
gpdr = pxa->regbase + GPDR_OFFSET;
|
gpdr = pxa->regbase + GPDR_OFFSET;
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
value = __raw_readl(gpdr);
|
value = __raw_readl(gpdr);
|
||||||
value &= ~mask;
|
if (__gpio_is_inverted(chip->base + offset))
|
||||||
|
value |= mask;
|
||||||
|
else
|
||||||
|
value &= ~mask;
|
||||||
__raw_writel(value, gpdr);
|
__raw_writel(value, gpdr);
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
|
|
||||||
@@ -97,7 +124,10 @@ static int pxa_gpio_direction_output(struct gpio_chip *chip,
|
|||||||
gpdr = pxa->regbase + GPDR_OFFSET;
|
gpdr = pxa->regbase + GPDR_OFFSET;
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
tmp = __raw_readl(gpdr);
|
tmp = __raw_readl(gpdr);
|
||||||
tmp |= mask;
|
if (__gpio_is_inverted(chip->base + offset))
|
||||||
|
tmp &= ~mask;
|
||||||
|
else
|
||||||
|
tmp |= mask;
|
||||||
__raw_writel(tmp, gpdr);
|
__raw_writel(tmp, gpdr);
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
|
|
||||||
@@ -173,10 +203,17 @@ static unsigned long GPIO_IRQ_mask[4];
|
|||||||
*/
|
*/
|
||||||
static int __gpio_is_occupied(unsigned gpio)
|
static int __gpio_is_occupied(unsigned gpio)
|
||||||
{
|
{
|
||||||
if (cpu_is_pxa25x() || cpu_is_pxa27x())
|
if (cpu_is_pxa27x() || cpu_is_pxa25x()) {
|
||||||
return GAFR(gpio) & (0x3 << (((gpio) & 0xf) * 2));
|
int af = (GAFR(gpio) >> ((gpio & 0xf) * 2)) & 0x3;
|
||||||
else
|
int dir = GPDR(gpio) & GPIO_bit(gpio);
|
||||||
return 0;
|
|
||||||
|
if (__gpio_is_inverted(gpio))
|
||||||
|
return af != 1 || dir == 0;
|
||||||
|
else
|
||||||
|
return af != 0 || dir != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
|
static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
|
||||||
@@ -190,9 +227,8 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
|
|||||||
/* Don't mess with enabled GPIOs using preconfigured edges or
|
/* Don't mess with enabled GPIOs using preconfigured edges or
|
||||||
* GPIOs set to alternate function or to output during probe
|
* GPIOs set to alternate function or to output during probe
|
||||||
*/
|
*/
|
||||||
if ((GPIO_IRQ_rising_edge[idx] |
|
if ((GPIO_IRQ_rising_edge[idx] & GPIO_bit(gpio)) ||
|
||||||
GPIO_IRQ_falling_edge[idx] |
|
(GPIO_IRQ_falling_edge[idx] & GPIO_bit(gpio)))
|
||||||
GPDR(gpio)) & GPIO_bit(gpio))
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (__gpio_is_occupied(gpio))
|
if (__gpio_is_occupied(gpio))
|
||||||
@@ -201,7 +237,10 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
|
|||||||
type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
|
type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPDR(gpio) &= ~GPIO_bit(gpio);
|
if (__gpio_is_inverted(gpio))
|
||||||
|
GPDR(gpio) |= GPIO_bit(gpio);
|
||||||
|
else
|
||||||
|
GPDR(gpio) &= ~GPIO_bit(gpio);
|
||||||
|
|
||||||
if (type & IRQ_TYPE_EDGE_RISING)
|
if (type & IRQ_TYPE_EDGE_RISING)
|
||||||
__set_bit(gpio, GPIO_IRQ_rising_edge);
|
__set_bit(gpio, GPIO_IRQ_rising_edge);
|
||||||
|
|||||||
@@ -0,0 +1,200 @@
|
|||||||
|
/*
|
||||||
|
* Hardware definitions for HP iPAQ h5xxx Handheld Computers
|
||||||
|
*
|
||||||
|
* Copyright 2000-2003 Hewlett-Packard Company.
|
||||||
|
* Copyright 2002 Jamey Hicks <jamey.hicks@hp.com>
|
||||||
|
* Copyright 2004-2005 Phil Blundell <pb@handhelds.org>
|
||||||
|
* Copyright 2007-2008 Anton Vorontsov <cbouatmailru@gmail.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
|
||||||
|
* AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
|
||||||
|
* FITNESS FOR ANY PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
* Author: Jamey Hicks.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/mtd/mtd.h>
|
||||||
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/mtd/physmap.h>
|
||||||
|
#include <asm/mach-types.h>
|
||||||
|
#include <asm/mach/arch.h>
|
||||||
|
#include <asm/mach/map.h>
|
||||||
|
#include <mach/h5000.h>
|
||||||
|
#include <mach/pxa-regs.h>
|
||||||
|
#include <mach/pxa2xx-regs.h>
|
||||||
|
#include <mach/mfp-pxa25x.h>
|
||||||
|
#include <mach/udc.h>
|
||||||
|
#include "generic.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Flash
|
||||||
|
*/
|
||||||
|
|
||||||
|
static struct mtd_partition h5000_flash0_partitions[] = {
|
||||||
|
{
|
||||||
|
.name = "bootldr",
|
||||||
|
.size = 0x00040000,
|
||||||
|
.offset = 0,
|
||||||
|
.mask_flags = MTD_WRITEABLE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "root",
|
||||||
|
.size = MTDPART_SIZ_FULL,
|
||||||
|
.offset = MTDPART_OFS_APPEND,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct mtd_partition h5000_flash1_partitions[] = {
|
||||||
|
{
|
||||||
|
.name = "second root",
|
||||||
|
.size = SZ_16M - 0x00040000,
|
||||||
|
.offset = 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "asset",
|
||||||
|
.size = MTDPART_SIZ_FULL,
|
||||||
|
.offset = MTDPART_OFS_APPEND,
|
||||||
|
.mask_flags = MTD_WRITEABLE,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct physmap_flash_data h5000_flash0_data = {
|
||||||
|
.width = 4,
|
||||||
|
.parts = h5000_flash0_partitions,
|
||||||
|
.nr_parts = ARRAY_SIZE(h5000_flash0_partitions),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct physmap_flash_data h5000_flash1_data = {
|
||||||
|
.width = 4,
|
||||||
|
.parts = h5000_flash1_partitions,
|
||||||
|
.nr_parts = ARRAY_SIZE(h5000_flash1_partitions),
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource h5000_flash0_resources = {
|
||||||
|
.start = PXA_CS0_PHYS,
|
||||||
|
.end = PXA_CS0_PHYS + SZ_32M - 1,
|
||||||
|
.flags = IORESOURCE_MEM | IORESOURCE_MEM_32BIT,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource h5000_flash1_resources = {
|
||||||
|
.start = PXA_CS0_PHYS + SZ_32M,
|
||||||
|
.end = PXA_CS0_PHYS + SZ_32M + SZ_16M - 1,
|
||||||
|
.flags = IORESOURCE_MEM | IORESOURCE_MEM_32BIT,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device h5000_flash[] = {
|
||||||
|
{
|
||||||
|
.name = "physmap-flash",
|
||||||
|
.id = 0,
|
||||||
|
.resource = &h5000_flash0_resources,
|
||||||
|
.num_resources = 1,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &h5000_flash0_data,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "physmap-flash",
|
||||||
|
.id = 1,
|
||||||
|
.resource = &h5000_flash1_resources,
|
||||||
|
.num_resources = 1,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &h5000_flash1_data,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USB Device Controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
static struct pxa2xx_udc_mach_info h5000_udc_mach_info __initdata = {
|
||||||
|
.gpio_pullup = H5000_GPIO_USB_PULLUP,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIO setup
|
||||||
|
*/
|
||||||
|
|
||||||
|
static unsigned long h5000_pin_config[] __initdata = {
|
||||||
|
/* Crystal and Clock Signals */
|
||||||
|
GPIO12_32KHz,
|
||||||
|
|
||||||
|
/* SDRAM and Static Memory I/O Signals */
|
||||||
|
GPIO15_nCS_1,
|
||||||
|
GPIO78_nCS_2,
|
||||||
|
GPIO79_nCS_3,
|
||||||
|
GPIO80_nCS_4,
|
||||||
|
|
||||||
|
/* FFUART */
|
||||||
|
GPIO34_FFUART_RXD,
|
||||||
|
GPIO35_FFUART_CTS,
|
||||||
|
GPIO36_FFUART_DCD,
|
||||||
|
GPIO37_FFUART_DSR,
|
||||||
|
GPIO38_FFUART_RI,
|
||||||
|
GPIO39_FFUART_TXD,
|
||||||
|
GPIO40_FFUART_DTR,
|
||||||
|
GPIO41_FFUART_RTS,
|
||||||
|
|
||||||
|
/* BTUART */
|
||||||
|
GPIO42_BTUART_RXD,
|
||||||
|
GPIO43_BTUART_TXD,
|
||||||
|
GPIO44_BTUART_CTS,
|
||||||
|
GPIO45_BTUART_RTS,
|
||||||
|
|
||||||
|
/* SSP1 */
|
||||||
|
GPIO23_SSP1_SCLK,
|
||||||
|
GPIO25_SSP1_TXD,
|
||||||
|
GPIO26_SSP1_RXD,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Localbus setup:
|
||||||
|
* CS0: Flash;
|
||||||
|
* CS1: MediaQ chip, select 16-bit bus and vlio;
|
||||||
|
* CS5: SAMCOP.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void fix_msc(void)
|
||||||
|
{
|
||||||
|
MSC0 = 0x129c24f2;
|
||||||
|
MSC1 = 0x7ff424fa;
|
||||||
|
MSC2 = 0x7ff47ff4;
|
||||||
|
|
||||||
|
MDREFR |= 0x02080000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Platform devices
|
||||||
|
*/
|
||||||
|
|
||||||
|
static struct platform_device *devices[] __initdata = {
|
||||||
|
&h5000_flash[0],
|
||||||
|
&h5000_flash[1],
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init h5000_init(void)
|
||||||
|
{
|
||||||
|
fix_msc();
|
||||||
|
|
||||||
|
pxa2xx_mfp_config(ARRAY_AND_SIZE(h5000_pin_config));
|
||||||
|
pxa_set_udc_info(&h5000_udc_mach_info);
|
||||||
|
platform_add_devices(ARRAY_AND_SIZE(devices));
|
||||||
|
}
|
||||||
|
|
||||||
|
MACHINE_START(H5400, "HP iPAQ H5000")
|
||||||
|
.phys_io = 0x40000000,
|
||||||
|
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
|
||||||
|
.boot_params = 0xa0000100,
|
||||||
|
.map_io = pxa_map_io,
|
||||||
|
.init_irq = pxa25x_init_irq,
|
||||||
|
.timer = &pxa_timer,
|
||||||
|
.init_machine = h5000_init,
|
||||||
|
MACHINE_END
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
/*
|
||||||
|
* Hardware definitions for HP iPAQ h5xxx Handheld Computers
|
||||||
|
*
|
||||||
|
* Copyright(20)02 Hewlett-Packard Company.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
|
||||||
|
* AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
|
||||||
|
* FITNESS FOR ANY PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
* Author: Jamey Hicks
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ASM_ARCH_H5000_H
|
||||||
|
#define __ASM_ARCH_H5000_H
|
||||||
|
|
||||||
|
#include <mach/mfp-pxa25x.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CPU GPIOs
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define H5000_GPIO_POWER_BUTTON (0)
|
||||||
|
#define H5000_GPIO_RESET_BUTTON_N (1)
|
||||||
|
#define H5000_GPIO_OPT_INT (2)
|
||||||
|
#define H5000_GPIO_BACKUP_POWER (3)
|
||||||
|
#define H5000_GPIO_ACTION_BUTTON (4)
|
||||||
|
#define H5000_GPIO_COM_DCD_SOMETHING (5) /* what is this really ? */
|
||||||
|
/* 6 not connected */
|
||||||
|
#define H5000_GPIO_RESET_BUTTON_AGAIN_N (7) /* connected to gpio 1 as well */
|
||||||
|
/* 8 not connected */
|
||||||
|
#define H5000_GPIO_RSO_N (9) /* reset output from max1702 which regulates 3.3 and 2.5 */
|
||||||
|
#define H5000_GPIO_ASIC_INT_N (10) /* from companion asic */
|
||||||
|
#define H5000_GPIO_BT_ENV_0 (11) /* to LMX9814, set to 1 according to regdump */
|
||||||
|
/*(12) not connected */
|
||||||
|
#define H5000_GPIO_BT_ENV_1 (13) /* to LMX9814, set to 1 according to regdump */
|
||||||
|
#define H5000_GPIO_BT_WU (14) /* from LMX9814, Defined as HOST_WAKEUP in the LMX9820 data sheet */
|
||||||
|
/*(15) is CS1# */
|
||||||
|
/*(16) not connected */
|
||||||
|
/*(17) not connected */
|
||||||
|
/*(18) is pcmcia ready */
|
||||||
|
/*(19) is dreq1 */
|
||||||
|
/*(20) is dreq0 */
|
||||||
|
#define H5000_GPIO_OE_RD_NWR (21) /* output enable on rd/nwr signal to companion asic */
|
||||||
|
/*(22) is not connected */
|
||||||
|
#define H5000_GPIO_OPT_SPI_CLK (23) /* to extension pack */
|
||||||
|
#define H5000_GPIO_OPT_SPI_CS_N (24) /* to extension pack */
|
||||||
|
#define H5000_GPIO_OPT_SPI_DOUT (25) /* to extension pack */
|
||||||
|
#define H5000_GPIO_OPT_SPI_DIN (26) /* to extension pack */
|
||||||
|
/*(27) not connected */
|
||||||
|
#define H5000_GPIO_I2S_BITCLK (28) /* connected to AC97 codec */
|
||||||
|
#define H5000_GPIO_I2S_DATAOUT (29) /* connected to AC97 codec */
|
||||||
|
#define H5000_GPIO_I2S_DATAIN (30) /* connected to AC97 codec */
|
||||||
|
#define H5000_GPIO_I2S_LRCLK (31) /* connected to AC97 codec */
|
||||||
|
#define H5000_GPIO_I2S_SYSCLK (32) /* connected to AC97 codec */
|
||||||
|
/*(33) is CS5# */
|
||||||
|
#define H5000_GPIO_COM_RXD (34) /* connected to cradle/cable connector */
|
||||||
|
#define H5000_GPIO_COM_CTS (35) /* connected to cradle/cable connector */
|
||||||
|
#define H5000_GPIO_COM_DCD (36) /* connected to cradle/cable connector */
|
||||||
|
#define H5000_GPIO_COM_DSR (37) /* connected to cradle/cable connector */
|
||||||
|
#define H5000_GPIO_COM_RI (38) /* connected to cradle/cable connector */
|
||||||
|
#define H5000_GPIO_COM_TXD (39) /* connected to cradle/cable connector */
|
||||||
|
#define H5000_GPIO_COM_DTR (40) /* connected to cradle/cable connector */
|
||||||
|
#define H5000_GPIO_COM_RTS (41) /* connected to cradle/cable connector */
|
||||||
|
|
||||||
|
#define H5000_GPIO_BT_RXD (42) /* connected to BT (LMX9814) */
|
||||||
|
#define H5000_GPIO_BT_TXD (43) /* connected to BT (LMX9814) */
|
||||||
|
#define H5000_GPIO_BT_CTS (44) /* connected to BT (LMX9814) */
|
||||||
|
#define H5000_GPIO_BT_RTS (45) /* connected to BT (LMX9814) */
|
||||||
|
|
||||||
|
#define H5000_GPIO_IRDA_RXD (46)
|
||||||
|
#define H5000_GPIO_IRDA_TXD (47)
|
||||||
|
|
||||||
|
#define H5000_GPIO_POE_N (48) /* used for pcmcia */
|
||||||
|
#define H5000_GPIO_PWE_N (49) /* used for pcmcia */
|
||||||
|
#define H5000_GPIO_PIOR_N (50) /* used for pcmcia */
|
||||||
|
#define H5000_GPIO_PIOW_N (51) /* used for pcmcia */
|
||||||
|
#define H5000_GPIO_PCE1_N (52) /* used for pcmcia */
|
||||||
|
#define H5000_GPIO_PCE2_N (53) /* used for pcmcia */
|
||||||
|
#define H5000_GPIO_PSKTSEL (54) /* used for pcmcia */
|
||||||
|
#define H5000_GPIO_PREG_N (55) /* used for pcmcia */
|
||||||
|
#define H5000_GPIO_PWAIT_N (56) /* used for pcmcia */
|
||||||
|
#define H5000_GPIO_IOIS16_N (57) /* used for pcmcia */
|
||||||
|
|
||||||
|
#define H5000_GPIO_IRDA_SD (58) /* to hsdl3002 sd */
|
||||||
|
/*(59) not connected */
|
||||||
|
#define H5000_GPIO_POWER_SD_N (60) /* controls power to SD */
|
||||||
|
#define H5000_GPIO_POWER_RS232_N (61) /* inverted FORCEON to rs232 transceiver */
|
||||||
|
#define H5000_GPIO_POWER_ACCEL_N (62) /* controls power to accel */
|
||||||
|
/*(63) is not connected */
|
||||||
|
#define H5000_GPIO_OPT_NVRAM (64) /* controls power to expansion pack */
|
||||||
|
#define H5000_GPIO_CHG_EN (65) /* to sc801 en */
|
||||||
|
#define H5000_GPIO_USB_PULLUP (66) /* USB d+ pullup via 1.5K resistor */
|
||||||
|
#define H5000_GPIO_BT_2V8_N (67) /* 2.8V used by bluetooth */
|
||||||
|
#define H5000_GPIO_EXT_CHG_RATE (68) /* enables external charging rate */
|
||||||
|
/*(69) is not connected */
|
||||||
|
#define H5000_GPIO_CIR_RESET (70) /* consumer IR reset */
|
||||||
|
#define H5000_GPIO_POWER_LIGHT_SENSOR_N (71)
|
||||||
|
#define H5000_GPIO_BT_M_RESET (72)
|
||||||
|
#define H5000_GPIO_STD_CHG_RATE (73)
|
||||||
|
#define H5000_GPIO_SD_WP_N (74)
|
||||||
|
#define H5000_GPIO_MOTOR_ON_N (75) /* external pullup on this */
|
||||||
|
#define H5000_GPIO_HEADPHONE_DETECT (76)
|
||||||
|
#define H5000_GPIO_USB_CHG_RATE (77) /* select rate for charging via usb */
|
||||||
|
/*(78) is CS2# */
|
||||||
|
/*(79) is CS3# */
|
||||||
|
/*(80) is CS4# */
|
||||||
|
|
||||||
|
#endif /* __ASM_ARCH_H5000_H */
|
||||||
@@ -102,6 +102,9 @@
|
|||||||
* PXA930 B0 0x69056835 0x5E643013
|
* PXA930 B0 0x69056835 0x5E643013
|
||||||
* PXA930 B1 0x69056837 0x7E643013
|
* PXA930 B1 0x69056837 0x7E643013
|
||||||
* PXA930 B2 0x69056838 0x8E643013
|
* PXA930 B2 0x69056838 0x8E643013
|
||||||
|
*
|
||||||
|
* PXA935 A0 0x56056931 0x1E653013
|
||||||
|
* PXA935 B0 0x56056936 0x6E653013
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_PXA25x
|
#ifdef CONFIG_PXA25x
|
||||||
#define __cpu_is_pxa210(id) \
|
#define __cpu_is_pxa210(id) \
|
||||||
@@ -178,12 +181,22 @@
|
|||||||
#define __cpu_is_pxa930(id) \
|
#define __cpu_is_pxa930(id) \
|
||||||
({ \
|
({ \
|
||||||
unsigned int _id = (id) >> 4 & 0xfff; \
|
unsigned int _id = (id) >> 4 & 0xfff; \
|
||||||
_id == 0x683; \
|
_id == 0x683; \
|
||||||
})
|
})
|
||||||
#else
|
#else
|
||||||
#define __cpu_is_pxa930(id) (0)
|
#define __cpu_is_pxa930(id) (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_CPU_PXA935
|
||||||
|
#define __cpu_is_pxa935(id) \
|
||||||
|
({ \
|
||||||
|
unsigned int _id = (id) >> 4 & 0xfff; \
|
||||||
|
_id == 0x693; \
|
||||||
|
})
|
||||||
|
#else
|
||||||
|
#define __cpu_is_pxa935(id) (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define cpu_is_pxa210() \
|
#define cpu_is_pxa210() \
|
||||||
({ \
|
({ \
|
||||||
__cpu_is_pxa210(read_cpuid_id()); \
|
__cpu_is_pxa210(read_cpuid_id()); \
|
||||||
@@ -204,8 +217,6 @@
|
|||||||
__cpu_is_pxa25x(read_cpuid_id()); \
|
__cpu_is_pxa25x(read_cpuid_id()); \
|
||||||
})
|
})
|
||||||
|
|
||||||
extern int cpu_is_pxa26x(void);
|
|
||||||
|
|
||||||
#define cpu_is_pxa27x() \
|
#define cpu_is_pxa27x() \
|
||||||
({ \
|
({ \
|
||||||
__cpu_is_pxa27x(read_cpuid_id()); \
|
__cpu_is_pxa27x(read_cpuid_id()); \
|
||||||
@@ -232,6 +243,12 @@ extern int cpu_is_pxa26x(void);
|
|||||||
__cpu_is_pxa930(id); \
|
__cpu_is_pxa930(id); \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
#define cpu_is_pxa935() \
|
||||||
|
({ \
|
||||||
|
unsigned int id = read_cpuid(CPUID_ID); \
|
||||||
|
__cpu_is_pxa935(id); \
|
||||||
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CPUID Core Generation Bit
|
* CPUID Core Generation Bit
|
||||||
* <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
|
* <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
|
||||||
@@ -249,6 +266,12 @@ extern int cpu_is_pxa26x(void);
|
|||||||
_id == 0x3; \
|
_id == 0x3; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
#define __cpu_is_pxa9xx(id) \
|
||||||
|
({ \
|
||||||
|
unsigned int _id = (id) >> 4 & 0xfff; \
|
||||||
|
_id == 0x683 || _id == 0x693; \
|
||||||
|
})
|
||||||
|
|
||||||
#define cpu_is_pxa2xx() \
|
#define cpu_is_pxa2xx() \
|
||||||
({ \
|
({ \
|
||||||
__cpu_is_pxa2xx(read_cpuid_id()); \
|
__cpu_is_pxa2xx(read_cpuid_id()); \
|
||||||
@@ -259,21 +282,10 @@ extern int cpu_is_pxa26x(void);
|
|||||||
__cpu_is_pxa3xx(read_cpuid_id()); \
|
__cpu_is_pxa3xx(read_cpuid_id()); \
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
#define cpu_is_pxa9xx() \
|
||||||
* Handy routine to set GPIO alternate functions
|
({ \
|
||||||
*/
|
__cpu_is_pxa9xx(read_cpuid_id()); \
|
||||||
extern int pxa_gpio_mode( int gpio_mode );
|
})
|
||||||
|
|
||||||
/*
|
|
||||||
* Return GPIO level, nonzero means high, zero is low
|
|
||||||
*/
|
|
||||||
extern int pxa_gpio_get_value(unsigned gpio);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set output GPIO level
|
|
||||||
*/
|
|
||||||
extern void pxa_gpio_set_value(unsigned gpio, int value);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* return current memory and LCD clock frequency in units of 10kHz
|
* return current memory and LCD clock frequency in units of 10kHz
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -158,4 +158,35 @@
|
|||||||
#define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW)
|
#define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW)
|
||||||
#define GPIO77_LCD_BIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW)
|
#define GPIO77_LCD_BIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW)
|
||||||
|
|
||||||
|
#ifdef CONFIG_CPU_PXA26x
|
||||||
|
/* GPIO */
|
||||||
|
#define GPIO85_GPIO MFP_CFG_IN(GPIO85, AF0)
|
||||||
|
#define GPIO86_GPIO MFP_CFG_IN(GPIO86, AF1)
|
||||||
|
#define GPIO87_GPIO MFP_CFG_IN(GPIO87, AF1)
|
||||||
|
#define GPIO88_GPIO MFP_CFG_IN(GPIO88, AF1)
|
||||||
|
#define GPIO89_GPIO MFP_CFG_IN(GPIO89, AF1)
|
||||||
|
|
||||||
|
/* SDRAM */
|
||||||
|
#define GPIO86_nSDCS2 MFP_CFG_OUT(GPIO86, AF0, DRIVE_HIGH)
|
||||||
|
#define GPIO87_nSDCS3 MFP_CFG_OUT(GPIO87, AF0, DRIVE_HIGH)
|
||||||
|
#define GPIO88_RDnWR MFP_CFG_OUT(GPIO88, AF0, DRIVE_HIGH)
|
||||||
|
#define GPIO89_nACRESET MFP_CFG_OUT(GPIO89, AF0, DRIVE_HIGH)
|
||||||
|
|
||||||
|
/* USB */
|
||||||
|
#define GPIO9_USB_RCV MFP_CFG_IN(GPIO9, AF1)
|
||||||
|
#define GPIO32_USB_VP MFP_CFG_IN(GPIO32, AF2)
|
||||||
|
#define GPIO34_USB_VM MFP_CFG_IN(GPIO34, AF2)
|
||||||
|
#define GPIO39_USB_VPO MFP_CFG_OUT(GPIO39, AF3, DRIVE_LOW)
|
||||||
|
#define GPIO56_USB_VMO MFP_CFG_OUT(GPIO56, AF1, DRIVE_LOW)
|
||||||
|
#define GPIO57_USB_nOE MFP_CFG_OUT(GPIO57, AF1, DRIVE_HIGH)
|
||||||
|
|
||||||
|
/* ASSP */
|
||||||
|
#define GPIO28_ASSP_BITCLK_IN MFP_CFG_IN(GPIO28, AF3)
|
||||||
|
#define GPIO28_ASSP_BITCLK_OUT MFP_CFG_OUT(GPIO28, AF3, DRIVE_LOW)
|
||||||
|
#define GPIO29_ASSP_RXD MFP_CFG_IN(GPIO29, AF3)
|
||||||
|
#define GPIO30_ASSP_TXD MFP_CFG_OUT(GPIO30, AF3, DRIVE_LOW)
|
||||||
|
#define GPIO31_ASSP_SFRM_IN MFP_CFG_IN(GPIO31, AF1)
|
||||||
|
#define GPIO31_ASSP_SFRM_OUT MFP_CFG_OUT(GPIO31, AF3, DRIVE_LOW)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ASM_ARCH_MFP_PXA25X_H */
|
#endif /* __ASM_ARCH_MFP_PXA25X_H */
|
||||||
|
|||||||
@@ -11,6 +11,12 @@
|
|||||||
#include <mach/mfp.h>
|
#include <mach/mfp.h>
|
||||||
#include <mach/mfp-pxa2xx.h>
|
#include <mach/mfp-pxa2xx.h>
|
||||||
|
|
||||||
|
/* Note: GPIO3/GPIO4 will be driven by Power I2C when PCFR/PI2C_EN
|
||||||
|
* bit is set, regardless of the GPIO configuration
|
||||||
|
*/
|
||||||
|
#define GPIO3_GPIO MFP_CFG_IN(GPIO3, AF0)
|
||||||
|
#define GPIO4_GPIO MFP_CFG_IN(GPIO4, AF0)
|
||||||
|
|
||||||
/* GPIO */
|
/* GPIO */
|
||||||
#define GPIO85_GPIO MFP_CFG_IN(GPIO85, AF0)
|
#define GPIO85_GPIO MFP_CFG_IN(GPIO85, AF0)
|
||||||
#define GPIO86_GPIO MFP_CFG_IN(GPIO86, AF0)
|
#define GPIO86_GPIO MFP_CFG_IN(GPIO86, AF0)
|
||||||
|
|||||||
@@ -10,12 +10,14 @@
|
|||||||
(MFP_PIN(pin) | MFP_##af | MFP_DIR_OUT | MFP_LPM_##state))
|
(MFP_PIN(pin) | MFP_##af | MFP_DIR_OUT | MFP_LPM_##state))
|
||||||
|
|
||||||
/* Global GPIOs */
|
/* Global GPIOs */
|
||||||
#define GPIO9_CHARGE_nEN 9
|
#define GPIO9_CHARGE_EN 9
|
||||||
#define GPIO18_POWEROFF 18
|
#define GPIO18_POWEROFF 18
|
||||||
#define GPIO87_LCD_POWER 87
|
#define GPIO87_LCD_POWER 87
|
||||||
|
#define GPIO96_AC_DETECT 96
|
||||||
|
#define GPIO80_MAYBE_CHARGE_VDROP 80 /* Drop of 88mV */
|
||||||
|
|
||||||
/* USB */
|
/* USB */
|
||||||
#define GPIO13_USB_DETECT 13
|
#define GPIO13_nUSB_DETECT 13
|
||||||
#define GPIO22_USB_ENABLE 22
|
#define GPIO22_USB_ENABLE 22
|
||||||
|
|
||||||
/* SDIO bits */
|
/* SDIO bits */
|
||||||
@@ -24,7 +26,10 @@
|
|||||||
#define GPIO91_SDIO_EN 91
|
#define GPIO91_SDIO_EN 91
|
||||||
|
|
||||||
/* Bluetooth */
|
/* Bluetooth */
|
||||||
|
#define GPIO14_BT_nACTIVITY 14
|
||||||
#define GPIO83_BT_ON 83
|
#define GPIO83_BT_ON 83
|
||||||
|
#define GPIO77_BT_UNKNOWN1 77
|
||||||
|
#define GPIO86_BT_MAYBE_nRESET 86
|
||||||
|
|
||||||
/* GPS */
|
/* GPS */
|
||||||
#define GPIO23_GPS_UNKNOWN1 23
|
#define GPIO23_GPS_UNKNOWN1 23
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user