]> git.hungrycats.org Git - linux/commitdiff
[ARM] Miscellaneous
authorRussell King <rmk@flint.arm.linux.org.uk>
Thu, 23 May 2002 01:43:51 +0000 (02:43 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Thu, 23 May 2002 01:43:51 +0000 (02:43 +0100)
 - Use definitions where possible.
 - Fix various errors in comments.
 - Fix missing max_pfn initialisation.
 - Add missing device.h and errno.h include files.
 - Ensure thread->flags is unsigned long for bitops.

12 files changed:
arch/arm/boot/compressed/head-l7200.S
arch/arm/mm/abort-lv4t.S
arch/arm/mm/fault-common.c
arch/arm/mm/init.c
arch/arm/tools/mach-types
drivers/acorn/char/mouse_rpc.c
drivers/pcmcia/sa1100_assabet.c
drivers/pcmcia/sa1100_generic.c
drivers/pcmcia/sa1100_generic.h
drivers/pcmcia/sa1100_neponset.c
drivers/pcmcia/sa1111_generic.c
include/asm-arm/thread_info.h

index 1eb2246c30774057e6986be343276e635099d1f8..b08bd23f8d1639ab291658b71290ea8cf27369a5 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <linux/config.h>
+#include <asm/mach-types.h>
 
 #ifndef CONFIG_ARCH_L7200
 #error What am I doing here...
@@ -26,4 +27,4 @@ __L7200_start:
                ble     1b
 
                mov     r8, #0                  @ Zero it out
-               mov     r7, #19                 @ Set architecture ID
+               mov     r7, #MACH_TYPE_L7200    @ Set architecture ID
index 6b768df8fab20bb4d9251f193c209d19f5571e92..1742f586de85e95751c6604ecbb8da0af886dc57 100644 (file)
@@ -66,8 +66,8 @@ ENTRY(v4t_late_abort)
        add     r6, r6, r2, lsr #3
        add     r6, r6, r6, lsr #8
        add     r6, r6, r6, lsr #4
-       and     r6, r6, #15                     @ r7 = no. of registers to transfer.
-       and     r5, r8, #15 << 16               @ Extract 'n' form instruction
+       and     r6, r6, #15                     @ r6 = no. of registers to transfer.
+       and     r5, r8, #15 << 16               @ Extract 'n' from instruction
        ldr     r7, [sp, r5, lsr #14]           @ Get register 'Rn'
        tst     r8, #1 << 23                    @ Check U bit
        subne   r7, r7, r6, lsl #2              @ Undo increment
index b39fd67963f73d25652d2e5972a5d478526d1d76..37770f82b35693d85bb73e1981d8f4f7b1992a52 100644 (file)
@@ -339,8 +339,7 @@ no_context:
 int do_translation_fault(unsigned long addr, int error_code, struct pt_regs *regs)
 {
        struct task_struct *tsk;
-       struct mm_struct *mm;
-       int offset;
+       unsigned int offset;
        pgd_t *pgd, *pgd_k;
        pmd_t *pmd, *pmd_k;
 
@@ -349,16 +348,17 @@ int do_translation_fault(unsigned long addr, int error_code, struct pt_regs *reg
 
        offset = __pgd_offset(addr);
 
+       /*
+        * FIXME: CP15 C1 is write only on ARMv3 architectures.
+        */
        pgd = cpu_get_pgd() + offset;
        pgd_k = init_mm.pgd + offset;
 
        if (pgd_none(*pgd_k))
                goto bad_area;
 
-#if 0  /* note that we are two-level */
        if (!pgd_present(*pgd))
                set_pgd(pgd, *pgd_k);
-#endif
 
        pmd_k = pmd_offset(pgd_k, addr);
        pmd   = pmd_offset(pgd, addr);
@@ -371,8 +371,7 @@ int do_translation_fault(unsigned long addr, int error_code, struct pt_regs *reg
 
 bad_area:
        tsk = current;
-       mm  = tsk->active_mm;
 
-       do_bad_area(tsk, mm, addr, error_code, regs);
+       do_bad_area(tsk, tsk->active_mm, addr, error_code, regs);
        return 0;
 }
index 2a36b155a8136a00d5e9d68a76f9ac034317ea13..d4eace179b841d6c86cf5852ccfb4204e7c798c7 100644 (file)
@@ -244,6 +244,7 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np)
         * also get rid of some of the stuff above as well.
         */
        max_low_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET);
+       max_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET);
        mi->end = memend_pfn << PAGE_SHIFT;
 
        return bootmem_pages;
index 76ca193d0112df71e6bed7f925f0716aa5e6b548..82dd2c7cf55f2adb305c9379dd43f273c5ad55f2 100644 (file)
@@ -6,7 +6,7 @@
 # To add an entry into this database, please see Documentation/arm/README,
 # or contact rmk@arm.linux.org.uk
 #
-# Last update: Fri Mar 29 15:51:20 2002
+# Last update: Tue May 21 14:19:05 2002
 #
 # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
 #
@@ -149,7 +149,7 @@ h3800                       SA1100_H3800            H3800                   137
 blue_v1                        ARCH_BLUE_V1            BLUE_V1                 138
 pxa_cerf               ARCH_PXA_CERF           PXA_CERF                139
 arm7tevb               ARCH_ARM7TEVB           ARM7TEVB                140
-d7400                  ARCH_D7400              D7400                   141
+d7400                  SA1100_D7400            D7400                   141
 piranha                        ARCH_PIRANHA            PIRANHA                 142
 sbcamelot              SA1100_SBCAMELOT        SBCAMELOT               143
 kings                  SA1100_KINGS            KINGS                   144
@@ -180,3 +180,15 @@ active                     SA1100_ACTIVE           ACTIVE                  168
 iq80321                        ARCH_IQ80321            IQ80321                 169
 wid                    SA1100_WID              WID                     170
 sabinal                        ARCH_SABINAL            SABINAL                 171
+ixp425_matacumbe       ARCH_IXP425_MATACUMBE   IXP425_MATACUMBE        172
+miniprint              SA1100_MINIPRINT        MINIPRINT               173
+adm510x                        ARCH_ADM510X            ADM510X                 174
+svs200                 SA1100_SVS200           SVS200                  175
+atg_tcu                        ARCH_ATG_TCU            ATG_TCU                 176
+jornada820             SA1100_JORNADA820       JORNADA820              177
+s3c44b0                        ARCH_S3C44B0            S3C44B0                 178
+margis2                        ARCH_MARGIS2            MARGIS2                 179
+ks8695                 ARCH_KS8695             KS8695                  180
+brh                    ARCH_BRH                BRH                     181
+s3c2410                        ARCH_S3C2410            S3C2410                 182
+possio_px30            ARCH_POSSIO_PX30        POSSIO_PX30             183
index dbfea910b07836e0f96e65684f45a42483b603d9..feafc25a7451101f4cfc44a8b7ae90285c4c46d1 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/ptrace.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
+#include <linux/errno.h>
 
 #include <asm/hardware.h>
 #include <asm/irq.h>
index 1a7cc433cf85bf48b0cf6d7652686128d90bb180..eb883f64e239fd8a51e0a89a0948104ab274e6bf 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/errno.h>
 #include <linux/init.h>
 
 #include <asm/hardware.h>
index 62a607d605a2ac2ef83a8886b0e2714695e7e815..38697b2ee19d3e873a6ca667b50e3d41814de9d2 100644 (file)
@@ -95,10 +95,11 @@ static struct tq_struct sa1100_pcmcia_task;
  * "Expansion Memory (PCMCIA) Configuration Register (MECR)"
  * that's section 10.2.5 in _my_ version of the manuial ;)
  */
-static int sa1100_pcmcia_default_mecr_timing(unsigned int sock, unsigned int cpu_speed,
-               unsigned int cmd_time )
+static unsigned int
+sa1100_pcmcia_default_mecr_timing(unsigned int sock, unsigned int cpu_speed,
+                                 unsigned int cmd_time)
 {
-       return sa1100_pcmcia_mecr_bs( cmd_time, cpu_speed );
+       return sa1100_pcmcia_mecr_bs(cmd_time, cpu_speed);
 }
 
 /* sa1100_pcmcia_set_mecr()
@@ -109,7 +110,7 @@ static int sa1100_pcmcia_default_mecr_timing(unsigned int sock, unsigned int cpu
  * Call board specific BS value calculation to allow boards
  * to tweak the BS values.
  */
-static int sa1100_pcmcia_set_mecr( int sock )
+static int sa1100_pcmcia_set_mecr(int sock)
 {
        struct sa1100_pcmcia_socket *skt;
        u32 mecr;
@@ -117,15 +118,15 @@ static int sa1100_pcmcia_set_mecr( int sock )
        long flags;
        unsigned int bs;
 
-       if ( sock<0 || sock>SA1100_PCMCIA_MAX_SOCK )
+       if (sock < 0 || sock > SA1100_PCMCIA_MAX_SOCK)
                return -1;
 
-       skt = PCMCIA_SOCKET( sock );
+       skt = PCMCIA_SOCKET(sock);
 
        local_irq_save(flags);
 
        clock = cpufreq_get(0);
-       bs = pcmcia_low_level->socket_get_timing( sock, clock, skt->speed_io);
+       bs = pcmcia_low_level->socket_get_timing(sock, clock, skt->speed_io);
 
        mecr = MECR;
        MECR_FAST_SET(mecr, sock, 0);
@@ -136,10 +137,10 @@ static int sa1100_pcmcia_set_mecr( int sock )
 
        local_irq_restore(flags);
 
-    DEBUG(4, "%s(): FAST%u %lx  BSM%u %lx  BSA%u %lx  BSIO%u %lx\n",
-         __FUNCTION__, sock, MECR_FAST_GET(mecr, sock), sock,
-         MECR_BSM_GET(mecr, sock), sock, MECR_BSA_GET(mecr, sock),
-         sock, MECR_BSIO_GET(mecr, sock));
+       DEBUG(4, "%s(): FAST%u %lx  BSM%u %lx  BSA%u %lx  BSIO%u %lx\n",
+             __FUNCTION__, sock, MECR_FAST_GET(mecr, sock), sock,
+             MECR_BSM_GET(mecr, sock), sock, MECR_BSA_GET(mecr, sock),
+             sock, MECR_BSIO_GET(mecr, sock));
 
        return 0;
 }
@@ -882,11 +883,11 @@ static struct pccard_operations sa1100_pcmcia_operations = {
  */
 static void sa1100_pcmcia_update_mecr(unsigned int clock)
 {
-  unsigned int sock;
+       unsigned int sock;
 
-  for (sock = 0; sock < SA1100_PCMCIA_MAX_SOCK; ++sock) {
-         sa1100_pcmcia_set_mecr( sock );
-  }
+       for (sock = 0; sock < SA1100_PCMCIA_MAX_SOCK; ++sock) {
+               sa1100_pcmcia_set_mecr(sock);
+       }
 }
 
 /* sa1100_pcmcia_notifier()
index 3b77e715af9db2eec064ea64b3ba21d0618cd0aa..daa043b1b52328796d4e209cefc0d06666c3bc37 100644 (file)
@@ -73,8 +73,8 @@ struct pcmcia_low_level {
   /*
    * Calculate MECR timing clock wait states
    */
-  int (*socket_get_timing)(unsigned int sock, unsigned int cpu_speed,
-                 unsigned int cmd_time );
+  unsigned int (*socket_get_timing)(unsigned int sock,
+               unsigned int cpu_speed, unsigned int cmd_time);
 };
 
 extern int sa1100_register_pcmcia(struct pcmcia_low_level *);
index 12408343d6535083878c1a72835d7750e5508125..d8e09192bacc15116532dead9eee20cf64a4c068 100644 (file)
@@ -5,6 +5,8 @@
  */
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/device.h>
+#include <linux/errno.h>
 #include <linux/init.h>
 
 #include <asm/hardware.h>
@@ -133,7 +135,7 @@ int __init pcmcia_neponset_init(void)
 {
        int ret = -ENODEV;
 
-       if (machine_is_assabet() && machine_has_neponset())
+       if (machine_is_assabet() && sa1111)
                ret = sa1100_register_pcmcia(&neponset_pcmcia_ops);
 
        return ret;
index bd2b7fb28afd83350fe5db9a1d4e7f664975c2ff..ef5a8b0bf153a1e1d906895f91443aa4cfd8256f 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/ioport.h>
+#include <linux/device.h>
 
 #include <asm/hardware.h>
 #include <asm/hardware/sa1111.h>
index ede2ac4359b166d58c1fa9aa0a8fe40c779b3c5b..154a688c170f4759f3699ac557162a663e953521 100644 (file)
@@ -28,7 +28,7 @@ typedef unsigned long mm_segment_t;           /* domain register      */
  * low level task data that entry.S needs immediate access to.
  */
 struct thread_info {
-       __u32                   flags;          /* low level flags */
+       unsigned long           flags;          /* low level flags */
        __s32                   preempt_count;  /* 0 => preemptable, <0 => bug */
        mm_segment_t            addr_limit;     /* address limit */
        __u32                   cpu;            /* cpu */