···740740741741endmenu742742743743-if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP)743743+if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX )744744745745menu "CPU Frequency scaling"746746···766766 For details, take a look at <file:Documentation/cpu-freq>.767767768768 If in doubt, say Y.769769+770770+config CPU_FREQ_IMX771771+ tristate "CPUfreq driver for i.MX CPUs"772772+ depends on ARCH_IMX && CPU_FREQ773773+ default n774774+ help775775+ This enables the CPUfreq driver for i.MX CPUs.776776+777777+ If in doubt, say N.769778770779endmenu771780···953944source "drivers/video/Kconfig"954945955946source "sound/Kconfig"947947+948948+source "drivers/hid/Kconfig"956949957950source "drivers/usb/Kconfig"958951
···2222#include <asm/thread_info.h>2323#include <asm/system.h>24242525-#define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET)2525+#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET)2626+#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET)26272728/*2829 * swapper_pg_dir is the virtual address of the initial page table.2929- * We place the page tables 16K below KERNEL_RAM_ADDR. Therefore, we must3030- * make sure that KERNEL_RAM_ADDR is correctly set. Currently, we expect3030+ * We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must3131+ * make sure that KERNEL_RAM_VADDR is correctly set. Currently, we expect3132 * the least significant 16 bits to be 0x8000, but we could probably3232- * relax this restriction to KERNEL_RAM_ADDR >= PAGE_OFFSET + 0x4000.3333+ * relax this restriction to KERNEL_RAM_VADDR >= PAGE_OFFSET + 0x4000.3334 */3434-#if (KERNEL_RAM_ADDR & 0xffff) != 0x80003535-#error KERNEL_RAM_ADDR must start at 0xXXXX80003535+#if (KERNEL_RAM_VADDR & 0xffff) != 0x80003636+#error KERNEL_RAM_VADDR must start at 0xXXXX80003637#endif37383839 .globl swapper_pg_dir3939- .equ swapper_pg_dir, KERNEL_RAM_ADDR - 0x40004040+ .equ swapper_pg_dir, KERNEL_RAM_VADDR - 0x400040414142 .macro pgtbl, rd4242- ldr \rd, =(__virt_to_phys(KERNEL_RAM_ADDR - 0x4000))4343+ ldr \rd, =(KERNEL_RAM_PADDR - 0x4000)4344 .endm44454546#ifdef CONFIG_XIP_KERNEL4647#define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)4748#else4848-#define TEXTADDR KERNEL_RAM_ADDR4949+#define TEXTADDR KERNEL_RAM_VADDR4950#endif50515152/*
···11+/*22+ * cpu.c: clock scaling for the iMX33+ *44+ * Copyright (C) 2000 2001, The Delft University of Technology55+ * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de>66+ * Copyright (C) 2006 Inky Lung <ilung@cwlinux.com>77+ * Copyright (C) 2006 Pavel Pisa, PiKRON <ppisa@pikron.com>88+ *99+ * Based on SA1100 version written by:1010+ * - Johan Pouwelse (J.A.Pouwelse@its.tudelft.nl): initial version1111+ * - Erik Mouw (J.A.K.Mouw@its.tudelft.nl):1212+ *1313+ * This program is free software; you can redistribute it and/or modify1414+ * it under the terms of the GNU General Public License as published by1515+ * the Free Software Foundation; either version 2 of the License, or1616+ * (at your option) any later version.1717+ *1818+ * This program is distributed in the hope that it will be useful,1919+ * but WITHOUT ANY WARRANTY; without even the implied warranty of2020+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the2121+ * GNU General Public License for more details.2222+ *2323+ * You should have received a copy of the GNU General Public License2424+ * along with this program; if not, write to the Free Software2525+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA2626+ *2727+ */2828+2929+/*#define DEBUG*/3030+3131+#include <linux/kernel.h>3232+#include <linux/types.h>3333+#include <linux/init.h>3434+#include <linux/cpufreq.h>3535+#include <asm/system.h>3636+3737+#include <asm/hardware.h>3838+3939+#include "generic.h"4040+4141+#ifndef __val2mfld4242+#define __val2mfld(mask,val) (((mask)&~((mask)<<1))*(val)&(mask))4343+#endif4444+#ifndef __mfld2val4545+#define __mfld2val(mask,val) (((val)&(mask))/((mask)&~((mask)<<1)))4646+#endif4747+4848+#define CR_920T_CLOCK_MODE 0xC00000004949+#define CR_920T_FASTBUS_MODE 0x000000005050+#define CR_920T_ASYNC_MODE 0xC00000005151+5252+static u32 mpctl0_at_boot;5353+5454+static void imx_set_async_mode(void)5555+{5656+ adjust_cr(CR_920T_CLOCK_MODE, CR_920T_ASYNC_MODE);5757+}5858+5959+static void imx_set_fastbus_mode(void)6060+{6161+ adjust_cr(CR_920T_CLOCK_MODE, CR_920T_FASTBUS_MODE);6262+}6363+6464+static void imx_set_mpctl0(u32 mpctl0)6565+{6666+ unsigned long flags;6767+6868+ if (mpctl0 == 0) {6969+ local_irq_save(flags);7070+ CSCR &= ~CSCR_MPEN;7171+ local_irq_restore(flags);7272+ return;7373+ }7474+7575+ local_irq_save(flags);7676+ MPCTL0 = mpctl0;7777+ CSCR |= CSCR_MPEN;7878+ local_irq_restore(flags);7979+}8080+8181+/**8282+ * imx_compute_mpctl - compute new PLL parameters8383+ * @new_mpctl: pointer to location assigned by new PLL control register value8484+ * @cur_mpctl: current PLL control register parameters8585+ * @freq: required frequency in Hz8686+ * @relation: is one of %CPUFREQ_RELATION_L (supremum)8787+ * and %CPUFREQ_RELATION_H (infimum)8888+ */8989+long imx_compute_mpctl(u32 *new_mpctl, u32 cur_mpctl, unsigned long freq, int relation)9090+{9191+ u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512);9292+ u32 mfi;9393+ u32 mfn;9494+ u32 mfd;9595+ u32 pd;9696+ unsigned long long ll;9797+ long l;9898+ long quot;9999+100100+ /* Fdppl=2*Fref*(MFI+MFN/(MFD+1))/(PD+1) */101101+ /* PD=<0,15>, MFD=<1,1023>, MFI=<5,15> MFN=<0,1022> */102102+103103+ if (cur_mpctl) {104104+ mfd = ((cur_mpctl >> 16) & 0x3ff) + 1;105105+ pd = ((cur_mpctl >> 26) & 0xf) + 1;106106+ } else {107107+ pd=2; mfd=313;108108+ }109109+110110+ /* pd=2; mfd=313; mfi=8; mfn=183; */111111+ /* (MFI+MFN/(MFD)) = Fdppl / (2*Fref) * (PD); */112112+113113+ quot = (f_ref + (1 << 9)) >> 10;114114+ l = (freq * pd + quot) / (2 * quot);115115+ mfi = l >> 10;116116+ mfn = ((l & ((1 << 10) - 1)) * mfd + (1 << 9)) >> 10;117117+118118+ mfd -= 1;119119+ pd -= 1;120120+121121+ *new_mpctl = ((mfi & 0xf) << 10) | (mfn & 0x3ff) | ((mfd & 0x3ff) << 16)122122+ | ((pd & 0xf) << 26);123123+124124+ ll = 2 * (unsigned long long)f_ref * ( (mfi<<16) + (mfn<<16) / (mfd+1) );125125+ quot = (pd+1) * (1<<16);126126+ ll += quot / 2;127127+ do_div(ll, quot);128128+ freq = ll;129129+130130+ pr_debug(KERN_DEBUG "imx: new PLL parameters pd=%d mfd=%d mfi=%d mfn=%d, freq=%ld\n",131131+ pd, mfd, mfi, mfn, freq);132132+133133+ return freq;134134+}135135+136136+137137+static int imx_verify_speed(struct cpufreq_policy *policy)138138+{139139+ if (policy->cpu != 0)140140+ return -EINVAL;141141+142142+ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq);143143+144144+ return 0;145145+}146146+147147+static unsigned int imx_get_speed(unsigned int cpu)148148+{149149+ unsigned int freq;150150+ unsigned int cr;151151+ unsigned int cscr;152152+ unsigned int bclk_div;153153+154154+ if (cpu)155155+ return 0;156156+157157+ cscr = CSCR;158158+ bclk_div = __mfld2val(CSCR_BCLK_DIV, cscr) + 1;159159+ cr = get_cr();160160+161161+ if((cr & CR_920T_CLOCK_MODE) == CR_920T_FASTBUS_MODE) {162162+ freq = imx_get_system_clk();163163+ freq = (freq + bclk_div/2) / bclk_div;164164+ } else {165165+ freq = imx_get_mcu_clk();166166+ if (cscr & CSCR_MPU_PRESC)167167+ freq /= 2;168168+ }169169+170170+ freq = (freq + 500) / 1000;171171+172172+ return freq;173173+}174174+175175+static int imx_set_target(struct cpufreq_policy *policy,176176+ unsigned int target_freq,177177+ unsigned int relation)178178+{179179+ struct cpufreq_freqs freqs;180180+ u32 mpctl0 = 0;181181+ u32 cscr;182182+ unsigned long flags;183183+ long freq;184184+ long sysclk;185185+ unsigned int bclk_div = 1;186186+187187+ freq = target_freq * 1000;188188+189189+ pr_debug(KERN_DEBUG "imx: requested frequency %ld Hz, mpctl0 at boot 0x%08x\n",190190+ freq, mpctl0_at_boot);191191+192192+ sysclk = imx_get_system_clk();193193+194194+ if (freq > sysclk + 1000000) {195195+ freq = imx_compute_mpctl(&mpctl0, mpctl0_at_boot, freq, relation);196196+ if (freq < 0) {197197+ printk(KERN_WARNING "imx: target frequency %ld Hz cannot be set\n", freq);198198+ return -EINVAL;199199+ }200200+ } else {201201+ if(freq + 1000 < sysclk) {202202+ if (relation == CPUFREQ_RELATION_L)203203+ bclk_div = (sysclk - 1000) / freq;204204+ else205205+ bclk_div = (sysclk + freq + 1000) / freq;206206+207207+ if(bclk_div > 16)208208+ bclk_div = 16;209209+ }210210+ freq = (sysclk + bclk_div / 2) / bclk_div;211211+ }212212+213213+ freqs.old = imx_get_speed(0);214214+ freqs.new = (freq + 500) / 1000;215215+ freqs.cpu = 0;216216+ freqs.flags = 0;217217+218218+ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);219219+220220+ local_irq_save(flags);221221+222222+ imx_set_fastbus_mode();223223+224224+ imx_set_mpctl0(mpctl0);225225+226226+ cscr = CSCR;227227+ cscr &= ~CSCR_BCLK_DIV;228228+ cscr |= __val2mfld(CSCR_BCLK_DIV, bclk_div - 1);229229+ CSCR = cscr;230230+231231+ if(mpctl0) {232232+ CSCR |= CSCR_MPLL_RESTART;233233+234234+ /* Wait until MPLL is stablized */235235+ while( CSCR & CSCR_MPLL_RESTART );236236+237237+ imx_set_async_mode();238238+ }239239+240240+ local_irq_restore(flags);241241+242242+ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);243243+244244+ pr_debug(KERN_INFO "imx: set frequency %ld Hz, running from %s\n",245245+ freq, mpctl0? "MPLL": "SPLL");246246+247247+ return 0;248248+}249249+250250+static int __init imx_cpufreq_driver_init(struct cpufreq_policy *policy)251251+{252252+ printk(KERN_INFO "i.MX cpu freq change driver v1.0\n");253253+254254+ if (policy->cpu != 0)255255+ return -EINVAL;256256+257257+ policy->cur = policy->min = policy->max = imx_get_speed(0);258258+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;259259+ policy->cpuinfo.min_freq = 8000;260260+ policy->cpuinfo.max_freq = 200000;261261+ policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;262262+ return 0;263263+}264264+265265+static struct cpufreq_driver imx_driver = {266266+ .flags = CPUFREQ_STICKY,267267+ .verify = imx_verify_speed,268268+ .target = imx_set_target,269269+ .get = imx_get_speed,270270+ .init = imx_cpufreq_driver_init,271271+ .name = "imx",272272+};273273+274274+static int __init imx_cpufreq_init(void)275275+{276276+277277+ mpctl0_at_boot = 0;278278+279279+ if((CSCR & CSCR_MPEN) &&280280+ ((get_cr() & CR_920T_CLOCK_MODE) != CR_920T_FASTBUS_MODE))281281+ mpctl0_at_boot = MPCTL0;282282+283283+ return cpufreq_register_driver(&imx_driver);284284+}285285+286286+arch_initcall(imx_cpufreq_init);287287+
+30-12
arch/arm/mach-netx/time.c
···19192020#include <linux/init.h>2121#include <linux/interrupt.h>2222+#include <linux/irq.h>2323+#include <linux/clocksource.h>22242325#include <asm/hardware.h>2426#include <asm/io.h>2527#include <asm/mach/time.h>2628#include <asm/arch/netx-regs.h>2727-2828-/*2929- * Returns number of us since last clock interrupt. Note that interrupts3030- * will have been disabled by do_gettimeoffset()3131- */3232-static unsigned long netx_gettimeoffset(void)3333-{3434- return readl(NETX_GPIO_COUNTER_CURRENT(0)) / 100;3535-}36293730/*3831 * IRQ handler for the timer···3643 write_seqlock(&xtime_lock);37443845 timer_tick();4646+3947 write_sequnlock(&xtime_lock);40484149 /* acknowledge interrupt */···4551 return IRQ_HANDLED;4652}47534848-4954static struct irqaction netx_timer_irq = {5055 .name = "NetX Timer Tick",5156 .flags = IRQF_DISABLED | IRQF_TIMER,5257 .handler = netx_timer_interrupt,5858+};5959+6060+cycle_t netx_get_cycles(void)6161+{6262+ return readl(NETX_GPIO_COUNTER_CURRENT(1));6363+}6464+6565+static struct clocksource clocksource_netx = {6666+ .name = "netx_timer",6767+ .rating = 200,6868+ .read = netx_get_cycles,6969+ .mask = CLOCKSOURCE_MASK(32),7070+ .shift = 20,7171+ .is_continuous = 1,5372};54735574/*···8780 NETX_GPIO_COUNTER_CTRL(0));88818982 setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq);8383+8484+ /* Setup timer one for clocksource */8585+ writel(0, NETX_GPIO_COUNTER_CTRL(1));8686+ writel(0, NETX_GPIO_COUNTER_CURRENT(1));8787+ writel(0xFFFFFFFF, NETX_GPIO_COUNTER_MAX(1));8888+8989+ writel(NETX_GPIO_COUNTER_CTRL_RUN,9090+ NETX_GPIO_COUNTER_CTRL(1));9191+9292+ clocksource_netx.mult =9393+ clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_netx.shift);9494+ clocksource_register(&clocksource_netx);9095}91969297struct sys_timer netx_timer = {9393- .init = netx_timer_init,9494- .offset = netx_gettimeoffset,9898+ .init = netx_timer_init,9599};
+23-22
arch/arm/mach-pxa/time.c
···1818#include <linux/signal.h>1919#include <linux/errno.h>2020#include <linux/sched.h>2121+#include <linux/clocksource.h>21222223#include <asm/system.h>2324#include <asm/hardware.h>···4746 }4847 RCNR = current_time;4948 return 0;5050-}5151-5252-/* IRQs are disabled before entering here from do_gettimeofday() */5353-static unsigned long pxa_gettimeoffset (void)5454-{5555- long ticks_to_match, elapsed, usec;5656-5757- /* Get ticks before next timer match */5858- ticks_to_match = OSMR0 - OSCR;5959-6060- /* We need elapsed ticks since last match */6161- elapsed = LATCH - ticks_to_match;6262-6363- /* don't get fooled by the workaround in pxa_timer_interrupt() */6464- if (elapsed <= 0)6565- return 0;6666-6767- /* Now convert them to usec */6868- usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH;6969-7070- return usec;7149}72507351#ifdef CONFIG_NO_IDLE_HZ···101121 .handler = pxa_timer_interrupt,102122};103123124124+cycle_t pxa_get_cycles(void)125125+{126126+ return OSCR;127127+}128128+129129+static struct clocksource clocksource_pxa = {130130+ .name = "pxa_timer",131131+ .rating = 200,132132+ .read = pxa_get_cycles,133133+ .mask = CLOCKSOURCE_MASK(32),134134+ .shift = 20,135135+ .is_continuous = 1,136136+};137137+104138static void __init pxa_timer_init(void)105139{106140 struct timespec tv;···133139 OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */134140 OSMR0 = OSCR + LATCH; /* set initial match */135141 local_irq_restore(flags);142142+143143+ /* on PXA OSCR runs continiously and is not written to, so we can use it144144+ * as clock source directly.145145+ */146146+ clocksource_pxa.mult =147147+ clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_pxa.shift);148148+ clocksource_register(&clocksource_pxa);149149+136150}137151138152#ifdef CONFIG_NO_IDLE_HZ···213211 .init = pxa_timer_init,214212 .suspend = pxa_timer_suspend,215213 .resume = pxa_timer_resume,216216- .offset = pxa_gettimeoffset,217214#ifdef CONFIG_NO_IDLE_HZ218215 .dyn_tick = &pxa_dyn_tick,219216#endif
···11/*22 * linux/arch/arm/mach-sa1100/jornada720.c33+ *44+ * HP Jornada720 init code55+ *66+ * Copyright (C) 2006 Filip Zyzniewski <filip.zyzniewski@tefnet.pl>77+ * Copyright (C) 2005 Michael Gernoth <michael@gernoth.net>88+ *99+ * This program is free software; you can redistribute it and/or modify1010+ * it under the terms of the GNU General Public License version 2 as1111+ * published by the Free Software Foundation.1212+ *313 */414515#include <linux/init.h>···2010#include <linux/ioport.h>2111#include <linux/mtd/mtd.h>2212#include <linux/mtd/partitions.h>1313+#include <video/s1d13xxxfb.h>23142415#include <asm/hardware.h>2516#include <asm/hardware/sa1111.h>2617#include <asm/irq.h>2718#include <asm/mach-types.h>2819#include <asm/setup.h>2929-3020#include <asm/mach/arch.h>3121#include <asm/mach/flash.h>3222#include <asm/mach/map.h>···34243525#include "generic.h"36262727+/*2828+ * HP Documentation referred in this file:2929+ * http://www.jlime.com/downloads/development/docs/jornada7xx/jornada720.txt3030+ */37313838-#define JORTUCR_VAL 0x200004003232+/* line 110 of HP's doc */3333+#define TUCR_VAL 0x200004003434+3535+/* memory space (line 52 of HP's doc) */3636+#define SA1111REGSTART 0x400000003737+#define SA1111REGLEN 0x00001fff3838+#define EPSONREGSTART 0x480000003939+#define EPSONREGLEN 0x001000004040+#define EPSONFBSTART 0x482000004141+/* 512kB framebuffer */4242+#define EPSONFBLEN 512*10244343+4444+static struct s1d13xxxfb_regval s1d13xxxfb_initregs[] = {4545+ /* line 344 of HP's doc */4646+ {0x0001,0x00}, // Miscellaneous Register4747+ {0x01FC,0x00}, // Display Mode Register4848+ {0x0004,0x00}, // General IO Pins Configuration Register 04949+ {0x0005,0x00}, // General IO Pins Configuration Register 15050+ {0x0008,0x00}, // General IO Pins Control Register 05151+ {0x0009,0x00}, // General IO Pins Control Register 15252+ {0x0010,0x01}, // Memory Clock Configuration Register5353+ {0x0014,0x11}, // LCD Pixel Clock Configuration Register5454+ {0x0018,0x01}, // CRT/TV Pixel Clock Configuration Register5555+ {0x001C,0x01}, // MediaPlug Clock Configuration Register5656+ {0x001E,0x01}, // CPU To Memory Wait State Select Register5757+ {0x0020,0x00}, // Memory Configuration Register5858+ {0x0021,0x45}, // DRAM Refresh Rate Register5959+ {0x002A,0x01}, // DRAM Timings Control Register 06060+ {0x002B,0x03}, // DRAM Timings Control Register 16161+ {0x0030,0x1c}, // Panel Type Register6262+ {0x0031,0x00}, // MOD Rate Register6363+ {0x0032,0x4F}, // LCD Horizontal Display Width Register6464+ {0x0034,0x07}, // LCD Horizontal Non-Display Period Register6565+ {0x0035,0x01}, // TFT FPLINE Start Position Register6666+ {0x0036,0x0B}, // TFT FPLINE Pulse Width Register6767+ {0x0038,0xEF}, // LCD Vertical Display Height Register 06868+ {0x0039,0x00}, // LCD Vertical Display Height Register 16969+ {0x003A,0x13}, // LCD Vertical Non-Display Period Register7070+ {0x003B,0x0B}, // TFT FPFRAME Start Position Register7171+ {0x003C,0x01}, // TFT FPFRAME Pulse Width Register7272+ {0x0040,0x05}, // LCD Display Mode Register (2:4bpp,3:8bpp,5:16bpp)7373+ {0x0041,0x00}, // LCD Miscellaneous Register7474+ {0x0042,0x00}, // LCD Display Start Address Register 07575+ {0x0043,0x00}, // LCD Display Start Address Register 17676+ {0x0044,0x00}, // LCD Display Start Address Register 27777+ {0x0046,0x80}, // LCD Memory Address Offset Register 07878+ {0x0047,0x02}, // LCD Memory Address Offset Register 17979+ {0x0048,0x00}, // LCD Pixel Panning Register8080+ {0x004A,0x00}, // LCD Display FIFO High Threshold Control Register8181+ {0x004B,0x00}, // LCD Display FIFO Low Threshold Control Register8282+ {0x0050,0x4F}, // CRT/TV Horizontal Display Width Register8383+ {0x0052,0x13}, // CRT/TV Horizontal Non-Display Period Register8484+ {0x0053,0x01}, // CRT/TV HRTC Start Position Register8585+ {0x0054,0x0B}, // CRT/TV HRTC Pulse Width Register8686+ {0x0056,0xDF}, // CRT/TV Vertical Display Height Register 08787+ {0x0057,0x01}, // CRT/TV Vertical Display Height Register 18888+ {0x0058,0x2B}, // CRT/TV Vertical Non-Display Period Register8989+ {0x0059,0x09}, // CRT/TV VRTC Start Position Register9090+ {0x005A,0x01}, // CRT/TV VRTC Pulse Width Register9191+ {0x005B,0x10}, // TV Output Control Register9292+ {0x0060,0x03}, // CRT/TV Display Mode Register (2:4bpp,3:8bpp,5:16bpp)9393+ {0x0062,0x00}, // CRT/TV Display Start Address Register 09494+ {0x0063,0x00}, // CRT/TV Display Start Address Register 19595+ {0x0064,0x00}, // CRT/TV Display Start Address Register 29696+ {0x0066,0x40}, // CRT/TV Memory Address Offset Register 09797+ {0x0067,0x01}, // CRT/TV Memory Address Offset Register 19898+ {0x0068,0x00}, // CRT/TV Pixel Panning Register9999+ {0x006A,0x00}, // CRT/TV Display FIFO High Threshold Control Register100100+ {0x006B,0x00}, // CRT/TV Display FIFO Low Threshold Control Register101101+ {0x0070,0x00}, // LCD Ink/Cursor Control Register102102+ {0x0071,0x01}, // LCD Ink/Cursor Start Address Register103103+ {0x0072,0x00}, // LCD Cursor X Position Register 0104104+ {0x0073,0x00}, // LCD Cursor X Position Register 1105105+ {0x0074,0x00}, // LCD Cursor Y Position Register 0106106+ {0x0075,0x00}, // LCD Cursor Y Position Register 1107107+ {0x0076,0x00}, // LCD Ink/Cursor Blue Color 0 Register108108+ {0x0077,0x00}, // LCD Ink/Cursor Green Color 0 Register109109+ {0x0078,0x00}, // LCD Ink/Cursor Red Color 0 Register110110+ {0x007A,0x1F}, // LCD Ink/Cursor Blue Color 1 Register111111+ {0x007B,0x3F}, // LCD Ink/Cursor Green Color 1 Register112112+ {0x007C,0x1F}, // LCD Ink/Cursor Red Color 1 Register113113+ {0x007E,0x00}, // LCD Ink/Cursor FIFO Threshold Register114114+ {0x0080,0x00}, // CRT/TV Ink/Cursor Control Register115115+ {0x0081,0x01}, // CRT/TV Ink/Cursor Start Address Register116116+ {0x0082,0x00}, // CRT/TV Cursor X Position Register 0117117+ {0x0083,0x00}, // CRT/TV Cursor X Position Register 1118118+ {0x0084,0x00}, // CRT/TV Cursor Y Position Register 0119119+ {0x0085,0x00}, // CRT/TV Cursor Y Position Register 1120120+ {0x0086,0x00}, // CRT/TV Ink/Cursor Blue Color 0 Register121121+ {0x0087,0x00}, // CRT/TV Ink/Cursor Green Color 0 Register122122+ {0x0088,0x00}, // CRT/TV Ink/Cursor Red Color 0 Register123123+ {0x008A,0x1F}, // CRT/TV Ink/Cursor Blue Color 1 Register124124+ {0x008B,0x3F}, // CRT/TV Ink/Cursor Green Color 1 Register125125+ {0x008C,0x1F}, // CRT/TV Ink/Cursor Red Color 1 Register126126+ {0x008E,0x00}, // CRT/TV Ink/Cursor FIFO Threshold Register127127+ {0x0100,0x00}, // BitBlt Control Register 0128128+ {0x0101,0x00}, // BitBlt Control Register 1129129+ {0x0102,0x00}, // BitBlt ROP Code/Color Expansion Register130130+ {0x0103,0x00}, // BitBlt Operation Register131131+ {0x0104,0x00}, // BitBlt Source Start Address Register 0132132+ {0x0105,0x00}, // BitBlt Source Start Address Register 1133133+ {0x0106,0x00}, // BitBlt Source Start Address Register 2134134+ {0x0108,0x00}, // BitBlt Destination Start Address Register 0135135+ {0x0109,0x00}, // BitBlt Destination Start Address Register 1136136+ {0x010A,0x00}, // BitBlt Destination Start Address Register 2137137+ {0x010C,0x00}, // BitBlt Memory Address Offset Register 0138138+ {0x010D,0x00}, // BitBlt Memory Address Offset Register 1139139+ {0x0110,0x00}, // BitBlt Width Register 0140140+ {0x0111,0x00}, // BitBlt Width Register 1141141+ {0x0112,0x00}, // BitBlt Height Register 0142142+ {0x0113,0x00}, // BitBlt Height Register 1143143+ {0x0114,0x00}, // BitBlt Background Color Register 0144144+ {0x0115,0x00}, // BitBlt Background Color Register 1145145+ {0x0118,0x00}, // BitBlt Foreground Color Register 0146146+ {0x0119,0x00}, // BitBlt Foreground Color Register 1147147+ {0x01E0,0x00}, // Look-Up Table Mode Register148148+ {0x01E2,0x00}, // Look-Up Table Address Register149149+ /* not sure, wouldn't like to mess with the driver */150150+ {0x01E4,0x00}, // Look-Up Table Data Register151151+ /* jornada doc says 0x00, but I trust the driver */152152+ {0x01F0,0x10}, // Power Save Configuration Register153153+ {0x01F1,0x00}, // Power Save Status Register154154+ {0x01F4,0x00}, // CPU-to-Memory Access Watchdog Timer Register155155+ {0x01FC,0x01}, // Display Mode Register(0x01:LCD, 0x02:CRT, 0x03:LCD&CRT)156156+};157157+158158+static struct s1d13xxxfb_pdata s1d13xxxfb_data = {159159+ .initregs = s1d13xxxfb_initregs,160160+ .initregssize = ARRAY_SIZE(s1d13xxxfb_initregs),161161+ .platform_init_video = NULL162162+};163163+164164+static struct resource s1d13xxxfb_resources[] = {165165+ [0] = {166166+ .start = EPSONFBSTART,167167+ .end = EPSONFBSTART + EPSONFBLEN,168168+ .flags = IORESOURCE_MEM,169169+ },170170+ [1] = {171171+ .start = EPSONREGSTART,172172+ .end = EPSONREGSTART + EPSONREGLEN,173173+ .flags = IORESOURCE_MEM,174174+ }175175+};176176+177177+static struct platform_device s1d13xxxfb_device = {178178+ .name = S1D_DEVICENAME,179179+ .id = 0,180180+ .dev = {181181+ .platform_data = &s1d13xxxfb_data,182182+ },183183+ .num_resources = ARRAY_SIZE(s1d13xxxfb_resources),184184+ .resource = s1d13xxxfb_resources,185185+};3918640187static struct resource sa1111_resources[] = {41188 [0] = {4242- .start = 0x40000000,4343- .end = 0x40001fff,189189+ .start = SA1111REGSTART,190190+ .end = SA1111REGSTART + SA1111REGLEN,44191 .flags = IORESOURCE_MEM,45192 },46193 [1] = {···22053 .resource = sa1111_resources,22154};222555656+static struct platform_device jornada720_mcu_device = {5757+ .name = "jornada720_mcu",5858+ .id = -1,5959+};6060+22361static struct platform_device *devices[] __initdata = {22462 &sa1111_device,6363+ &jornada720_mcu_device,6464+ &s1d13xxxfb_device,22565};6666+6767+/* a stub for now, we theoretically cannot suspend without a flashboard */6868+int pm_suspend(suspend_state_t state)6969+{7070+ return -1;7171+}2267222773static int __init jornada720_init(void)22874{···2436324464 if (machine_is_jornada720()) {24565 GPDR |= GPIO_GPIO20;246246- TUCR = JORTUCR_VAL; /* set the oscillator out to the SA-1101 */247247-6666+ /* oscillator setup (line 116 of HP's doc) */6767+ TUCR = TUCR_VAL;6868+ /* resetting SA1111 (line 118 of HP's doc) */24869 GPSR = GPIO_GPIO20;24970 udelay(1);25071 GPCR = GPIO_GPIO20;25172 udelay(1);25273 GPSR = GPIO_GPIO20;25374 udelay(20);254254-255255- /* LDD4 is speaker, LDD3 is microphone */256256- PPSR &= ~(PPC_LDD3 | PPC_LDD4);257257- PPDR |= PPC_LDD3 | PPC_LDD4;2587525976 ret = platform_add_devices(devices, ARRAY_SIZE(devices));26077 }···2628526386static struct map_desc jornada720_io_desc[] __initdata = {26487 { /* Epson registers */265265- .virtual = 0xf0000000,266266- .pfn = __phys_to_pfn(0x48000000),267267- .length = 0x00100000,8888+ .virtual = 0xf0000000,8989+ .pfn = __phys_to_pfn(EPSONREGSTART),9090+ .length = EPSONREGLEN,26891 .type = MT_DEVICE26992 }, { /* Epson frame buffer */270270- .virtual = 0xf1000000,271271- .pfn = __phys_to_pfn(0x48200000),272272- .length = 0x00100000,9393+ .virtual = 0xf1000000,9494+ .pfn = __phys_to_pfn(EPSONFBSTART),9595+ .length = EPSONFBLEN,27396 .type = MT_DEVICE27497 }, { /* SA-1111 */275275- .virtual = 0xf4000000,276276- .pfn = __phys_to_pfn(0x40000000),277277- .length = 0x00100000,9898+ .virtual = 0xf4000000,9999+ .pfn = __phys_to_pfn(SA1111REGSTART),100100+ .length = SA1111REGLEN,278101 .type = MT_DEVICE279102 }280103};···283106{284107 sa1100_map_io();285108 iotable_init(jornada720_io_desc, ARRAY_SIZE(jornada720_io_desc));286286-109109+287110 sa1100_register_uart(0, 3);288111 sa1100_register_uart(1, 1);289112}···293116 .name = "JORNADA720 boot firmware",294117 .size = 0x00040000,295118 .offset = 0,296296- .mask_flags = MTD_WRITEABLE, /* force read-only */119119+ .mask_flags = MTD_WRITEABLE, /* force read-only */297120 }, {298121 .name = "JORNADA720 kernel",299122 .size = 0x000c0000,···316139 .offset = 0x00540000,317140 }, {318141 .name = "JORNADA720 usr local",319319- .size = 0, /* will expand to the end of the flash */142142+ .size = 0, /* will expand to the end of the flash */320143 .offset = 0x00d00000,321144 }322145};···324147static void jornada720_set_vpp(int vpp)325148{326149 if (vpp)327327- PPSR |= 0x80;150150+ /* enabling flash write (line 470 of HP's doc) */151151+ PPSR |= PPC_LDD7;328152 else329329- PPSR &= ~0x80;330330- PPDR |= 0x80;153153+ /* disabling flash write (line 470 of HP's doc) */154154+ PPSR &= ~PPC_LDD7;155155+ PPDR |= PPC_LDD7;331156}332157333158static struct flash_platform_data jornada720_flash_data = {
+1-1
arch/arm/mm/consistent.c
···238238 * x86 does not mark the pages reserved...239239 */240240 SetPageReserved(page);241241- set_pte(pte, mk_pte(page, prot));241241+ set_pte_ext(pte, mk_pte(page, prot), 0);242242 page++;243243 pte++;244244 off++;