]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-net
authorWolfgang Denk <wd@denx.de>
Wed, 11 Nov 2009 22:10:34 +0000 (23:10 +0100)
committerWolfgang Denk <wd@denx.de>
Wed, 11 Nov 2009 22:10:34 +0000 (23:10 +0100)
22 files changed:
board/espt/lowlevel_init.S
board/freescale/mpc8572ds/mpc8572ds.c
board/freescale/mpc8610hpcd/mpc8610hpcd.c
board/freescale/mpc8641hpcn/mpc8641hpcn.c
board/freescale/p1_p2_rdb/pci.c
board/freescale/p2020ds/p2020ds.c
board/renesas/sh7785lcr/lowlevel_init.S
board/sbc8548/sbc8548.c
board/sbc8641d/sbc8641d.c
cpu/mpc85xx/release.S
cpu/ppc4xx/44x_spd_ddr2.c
drivers/pci/fsl_pci_init.c
include/asm-arm/unaligned.h
include/asm-ppc/fsl_pci.h
include/configs/canyonlands.h
include/configs/sbc8349.h
include/linux/unaligned/be_byteshift.h [new file with mode: 0644]
include/linux/unaligned/le_byteshift.h [new file with mode: 0644]
lib_nios/board.c
lib_nios2/board.c
lib_sh/board.c
nand_spl/nand_boot_fsl_elbc.c

index 7d5d72e123ff36e257aafa9c30c90701b4d1e707..7f0686c536bd120c671a3dff784917803723e9a7 100644 (file)
@@ -72,15 +72,7 @@ lowlevel_init:
        /* set DDR-SDRAM dummy read */
        write32 MMSEL_A, MMSEL_D
 
-       mov.l   MMSEL_A, r0
-       synco
-       mov.l   @r0, r1
-       synco
-
-       mov.l   CS0_A, r0
-       synco
-       mov.l   @r0, r1
-       synco
+       write32 MMSEL_A, CS0_A
 
        /* set DDR-SDRAM bus/endian etc */
        write32 MIM_U_A, MIM_U_D
index 2b3223453f96f11b4d1eb5085ab71824cea889ed..933dd127ec922d68b0a008cfaf3f25183a795c50 100644 (file)
@@ -199,7 +199,7 @@ void pci_init_board(void)
                                pcie_ep ? "End Point" : "Root Complex",
                                pci_info[num].regs);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                               &pcie3_hose, first_free_busno, pcie_ep);
+                                       &pcie3_hose, first_free_busno);
                /*
                 * Activate ULI1575 legacy chip by performing a fake
                 * memory access.  Needed to make ULI RTC work.
@@ -231,7 +231,7 @@ void pci_init_board(void)
                                pcie_ep ? "End Point" : "Root Complex",
                                pci_info[num].regs);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                               &pcie2_hose, first_free_busno, pcie_ep);
+                                       &pcie2_hose, first_free_busno);
        } else {
                printf ("    PCIE2: disabled\n");
        }
@@ -251,7 +251,7 @@ void pci_init_board(void)
                                pcie_ep ? "End Point" : "Root Complex",
                                pci_info[num].regs);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                               &pcie1_hose, first_free_busno, pcie_ep);
+                                       &pcie1_hose, first_free_busno);
        } else {
                printf ("    PCIE1: disabled\n");
        }
index 358148faf2a84febe1b23859c38b6938aaf93303..f42c3167224d5f843476b81b00554fc42760538b 100644 (file)
@@ -127,11 +127,6 @@ initdram(int board_type)
        dram_size = fixed_sdram();
 #endif
 
-#if defined(CONFIG_SYS_RAMBOOT)
-       puts(" DDR: ");
-       return dram_size;
-#endif
-
        puts(" DDR: ");
        return dram_size;
 }
index 1a08afa69ec2b8b462a32eb81458101747d3d6a8..c521527d890b4a27264dfbfdf73ac9f718bb0e3b 100644 (file)
@@ -74,11 +74,6 @@ initdram(int board_type)
        dram_size = fixed_sdram();
 #endif
 
-#if defined(CONFIG_SYS_RAMBOOT)
-       puts("    DDR: ");
-       return dram_size;
-#endif
-
        puts("    DDR: ");
        return dram_size;
 }
index 77365967389ac7f3f606a405efb9eb8aa0f37216..4c08f9efa0beab77236cd1bacb87142928e35158 100644 (file)
@@ -71,7 +71,7 @@ void pci_init_board(void)
                                pcie_ep ? "End Point" : "Root Complex",
                                pci_info[num].regs);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                                       &pcie2_hose, first_free_busno, pcie_ep);
+                                       &pcie2_hose, first_free_busno);
        } else {
                printf ("    PCIE2: disabled\n");
        }
@@ -90,7 +90,7 @@ void pci_init_board(void)
                                pcie_ep ? "End Point" : "Root Complex",
                                pci_info[num].regs);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                                       &pcie1_hose, first_free_busno, pcie_ep);
+                                       &pcie1_hose, first_free_busno);
        } else {
                printf ("    PCIE1: disabled\n");
        }
index 9878fba10fcfc16aba32701a2f5c55f25dfbbe91..e38c0145edc6a3be6116248d5e01fb18f4c3bc8f 100644 (file)
@@ -227,7 +227,7 @@ void pci_init_board(void)
                                pcie_ep ? "End Point" : "Root Complex",
                                pci_info[num].regs);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                               &pcie2_hose, first_free_busno, pcie_ep);
+                                       &pcie2_hose, first_free_busno);
 
                /*
                 * The workaround doesn't work on p2020 because the location
@@ -267,7 +267,7 @@ void pci_init_board(void)
                                pcie_ep ? "End Point" : "Root Complex",
                                pci_info[num].regs);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                               &pcie3_hose, first_free_busno, pcie_ep);
+                                       &pcie3_hose, first_free_busno);
        } else {
                printf("    PCIE3: disabled\n");
        }
@@ -286,7 +286,7 @@ void pci_init_board(void)
                                pcie_ep ? "End Point" : "Root Complex",
                                pci_info[num].regs);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                               &pcie1_hose, first_free_busno, pcie_ep);
+                                       &pcie1_hose, first_free_busno);
        } else {
                printf("    PCIE1: disabled\n");
        }
index 7faad95ffd7e3c72a9c3877e3d4db0d6d33ad530..40d9b08c7ddd47c1618e991fc7e7207571d0ae86 100644 (file)
@@ -178,60 +178,6 @@ lbsc_end:
 
        .align 4
 
-/*------- LBSC -------*/
-MMSELR_A:      .long   0xfc400020
-#if defined(CONFIG_SH_32BIT)
-MMSELR_D:      .long   0xa5a50005
-#else
-MMSELR_D:      .long   0xa5a50002
-#endif
-
-/*------- DBSC2 -------*/
-#define DBSC2_BASE     0xfe800000
-DBSC2_DBSTATE_A:       .long   DBSC2_BASE + 0x0c
-DBSC2_DBEN_A:          .long   DBSC2_BASE + 0x10
-DBSC2_DBCMDCNT_A:      .long   DBSC2_BASE + 0x14
-DBSC2_DBCONF_A:                .long   DBSC2_BASE + 0x20
-DBSC2_DBTR0_A:         .long   DBSC2_BASE + 0x30
-DBSC2_DBTR1_A:         .long   DBSC2_BASE + 0x34
-DBSC2_DBTR2_A:         .long   DBSC2_BASE + 0x38
-DBSC2_DBRFCNT0_A:      .long   DBSC2_BASE + 0x40
-DBSC2_DBRFCNT1_A:      .long   DBSC2_BASE + 0x44
-DBSC2_DBRFCNT2_A:      .long   DBSC2_BASE + 0x48
-DBSC2_DBRFSTS_A:       .long   DBSC2_BASE + 0x4c
-DBSC2_DBFREQ_A:                .long   DBSC2_BASE + 0x50
-DBSC2_DBDICODTOCD_A:   .long   DBSC2_BASE + 0x54
-DBSC2_DBMRCNT_A:       .long   DBSC2_BASE + 0x60
-DDR_DUMMY_ACCESS_A:    .long   0x40000000
-
-DBSC2_DBCONF_D:                .long   0x00630002
-DBSC2_DBTR0_D:         .long   0x050b1f04
-DBSC2_DBTR1_D:         .long   0x00040204
-DBSC2_DBTR2_D:         .long   0x02100308
-DBSC2_DBFREQ_D1:       .long   0x00000000
-DBSC2_DBFREQ_D2:       .long   0x00000100
-DBSC2_DBDICODTOCD_D:   .long   0x000f0907
-
-DBSC2_DBCMDCNT_D_CKE_H:        .long   0x00000003
-DBSC2_DBCMDCNT_D_PALL: .long   0x00000002
-DBSC2_DBCMDCNT_D_REF:  .long   0x00000004
-
-DBSC2_DBMRCNT_D_EMRS2: .long   0x00020000
-DBSC2_DBMRCNT_D_EMRS3: .long   0x00030000
-DBSC2_DBMRCNT_D_EMRS1_1:       .long   0x00010006
-DBSC2_DBMRCNT_D_EMRS1_2:       .long   0x00010386
-DBSC2_DBMRCNT_D_MRS_1: .long   0x00000952
-DBSC2_DBMRCNT_D_MRS_2: .long   0x00000852
-
-DBSC2_DBEN_D:          .long   0x00000001
-
-DBSC2_DBPDCNT0_D3:     .long   0x00000080
-DBSC2_DBRFCNT1_D:      .long   0x00000926
-DBSC2_DBRFCNT2_D:      .long   0x00fe00fe
-DBSC2_DBRFCNT0_D:      .long   0x00010000
-
-WAIT_200US:    .long   33333
-
 /*------- GPIO -------*/
 PACR_D:                .long   0x0000
 PBCR_D:                .long   0x0000
@@ -291,6 +237,59 @@ PPUPR2_A:  .long   GPIO_BASE + 0x62
 P1MSELR_A:     .long   GPIO_BASE + 0x80
 P2MSELR_A:     .long   GPIO_BASE + 0x82
 
+MMSELR_A:      .long   0xfc400020
+#if defined(CONFIG_SH_32BIT)
+MMSELR_D:      .long   0xa5a50005
+#else
+MMSELR_D:      .long   0xa5a50002
+#endif
+
+/*------- DBSC2 -------*/
+#define DBSC2_BASE     0xfe800000
+DBSC2_DBSTATE_A:       .long   DBSC2_BASE + 0x0c
+DBSC2_DBEN_A:          .long   DBSC2_BASE + 0x10
+DBSC2_DBCMDCNT_A:      .long   DBSC2_BASE + 0x14
+DBSC2_DBCONF_A:                .long   DBSC2_BASE + 0x20
+DBSC2_DBTR0_A:         .long   DBSC2_BASE + 0x30
+DBSC2_DBTR1_A:         .long   DBSC2_BASE + 0x34
+DBSC2_DBTR2_A:         .long   DBSC2_BASE + 0x38
+DBSC2_DBRFCNT0_A:      .long   DBSC2_BASE + 0x40
+DBSC2_DBRFCNT1_A:      .long   DBSC2_BASE + 0x44
+DBSC2_DBRFCNT2_A:      .long   DBSC2_BASE + 0x48
+DBSC2_DBRFSTS_A:       .long   DBSC2_BASE + 0x4c
+DBSC2_DBFREQ_A:                .long   DBSC2_BASE + 0x50
+DBSC2_DBDICODTOCD_A:.long      DBSC2_BASE + 0x54
+DBSC2_DBMRCNT_A:       .long   DBSC2_BASE + 0x60
+DDR_DUMMY_ACCESS_A:    .long   0x40000000
+
+DBSC2_DBCONF_D:                .long   0x00630002
+DBSC2_DBTR0_D:         .long   0x050b1f04
+DBSC2_DBTR1_D:         .long   0x00040204
+DBSC2_DBTR2_D:         .long   0x02100308
+DBSC2_DBFREQ_D1:       .long   0x00000000
+DBSC2_DBFREQ_D2:       .long   0x00000100
+DBSC2_DBDICODTOCD_D:.long      0x000f0907
+
+DBSC2_DBCMDCNT_D_CKE_H:        .long   0x00000003
+DBSC2_DBCMDCNT_D_PALL: .long   0x00000002
+DBSC2_DBCMDCNT_D_REF:  .long   0x00000004
+
+DBSC2_DBMRCNT_D_EMRS2: .long   0x00020000
+DBSC2_DBMRCNT_D_EMRS3: .long   0x00030000
+DBSC2_DBMRCNT_D_EMRS1_1:       .long   0x00010006
+DBSC2_DBMRCNT_D_EMRS1_2:       .long   0x00010386
+DBSC2_DBMRCNT_D_MRS_1: .long   0x00000952
+DBSC2_DBMRCNT_D_MRS_2: .long   0x00000852
+
+DBSC2_DBEN_D:          .long   0x00000001
+
+DBSC2_DBPDCNT0_D3:     .long   0x00000080
+DBSC2_DBRFCNT1_D:      .long   0x00000926
+DBSC2_DBRFCNT2_D:      .long   0x00fe00fe
+DBSC2_DBRFCNT0_D:      .long   0x00010000
+
+WAIT_200US:    .long   33333
+
 /*------- LBSC -------*/
 PASCR_A:               .long   0xff000070
 PASCR_32BIT_MODE:      .long   0x80000000      /* check booting mode */
index 5e3e17658d2a3d2c787c2115276f7e6ed856bf15..194f6ab961f9d68db5acfa97885d7037065edc88 100644 (file)
@@ -359,7 +359,7 @@ pci_init_board(void)
 
                SET_STD_PCI_INFO(pci_info[num], 1);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                                       &pci1_hose, first_free_busno, 0);
+                                       &pci1_hose, first_free_busno);
        } else {
                printf ("    PCI: disabled\n");
        }
@@ -378,7 +378,7 @@ pci_init_board(void)
                SET_STD_PCIE_INFO(pci_info[num], 1);
                printf ("    PCIE at base address %lx\n", pci_info[num].regs);
                first_free_busno = fsl_pci_init_port(&pci_info[num++],
-                                       &pcie1_hose, first_free_busno, 0);
+                                       &pcie1_hose, first_free_busno);
        } else {
                printf ("    PCIE: disabled\n");
        }
index aabefa9a7564c19d88b2040865ac32373b22ce2a..c4e987532494d1a7701a744e6ddd7e1029fe303f 100644 (file)
@@ -62,11 +62,6 @@ phys_size_t initdram (int board_type)
        dram_size = fixed_sdram ();
 #endif
 
-#if defined(CONFIG_SYS_RAMBOOT)
-       puts ("    DDR: ");
-       return dram_size;
-#endif
-
        puts ("    DDR: ");
        return dram_size;
 }
index a1ae78a7f55f35b1f08f772f65e17fdbadf88810..433ff0254487fd4bdede65a08cd8d88ed89f5790 100644 (file)
@@ -102,18 +102,22 @@ __secondary_start_page:
 #ifdef CONFIG_BACKSIDE_L2_CACHE
        /* Enable/invalidate the L2 cache */
        msync
-       lis     r3,(L2CSR0_L2FI|L2CSR0_L2LFC)@h
-       ori     r3,r3,(L2CSR0_L2FI|L2CSR0_L2LFC)@l
-       mtspr   SPRN_L2CSR0,r3
+       lis     r2,(L2CSR0_L2FI|L2CSR0_L2LFC)@h
+       ori     r2,r2,(L2CSR0_L2FI|L2CSR0_L2LFC)@l
+       mtspr   SPRN_L2CSR0,r2
 1:
        mfspr   r3,SPRN_L2CSR0
-       andis.  r1,r3,L2CSR0_L2FI@h
+       and.    r1,r3,r2
        bne     1b
 
        lis     r3,CONFIG_SYS_INIT_L2CSR0@h
        ori     r3,r3,CONFIG_SYS_INIT_L2CSR0@l
        mtspr   SPRN_L2CSR0,r3
        isync
+2:
+       mfspr   r3,SPRN_L2CSR0
+       andis.  r1,r3,L2CSR0_L2E@h
+       beq     2b
 #endif
 
 #define EPAPR_MAGIC            (0x45504150)
index 39753064006229fda38e2a540ffaada47752c9c2..f8aa14aadb6b3f513fedc0f4e21a663b3773b7d0 100644 (file)
@@ -3160,7 +3160,7 @@ inline void ppc4xx_ibm_ddr2_register_dump(void)
        PPC4xx_IBM_DDR2_DUMP_REGISTER(SDTR3);
        PPC4xx_IBM_DDR2_DUMP_REGISTER(MMODE);
        PPC4xx_IBM_DDR2_DUMP_REGISTER(MEMODE);
-       PPC4xx_IBM_DDR2_DUMP_REGISTER(ECCCR);
+       PPC4xx_IBM_DDR2_DUMP_REGISTER(ECCES);
 #if (defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
      defined(CONFIG_460EX) || defined(CONFIG_460GT))
        PPC4xx_IBM_DDR2_DUMP_REGISTER(CID);
index 8fbab68a20d1a8643c4604f1abf187b88dfa29c8..170cc257cd35de8687b616adea6efc531660225e 100644 (file)
@@ -42,6 +42,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define FSL_PCI_PBFR           0x44
 #define FSL_PCIE_CAP_ID                0x4c
 #define FSL_PCIE_CFG_RDY       0x4b0
+#define FSL_PROG_IF_AGENT      0x1
 
 void pciauto_prescan_setup_bridge(struct pci_controller *hose,
                                pci_dev_t dev, int sub_bus);
@@ -412,28 +413,24 @@ void fsl_pci_init(struct pci_controller *hose, u32 cfg_addr, u32 cfg_data)
        }
 }
 
+int fsl_is_pci_agent(struct pci_controller *hose)
+{
+       u8 prog_if;
+       pci_dev_t dev = PCI_BDF(hose->first_busno, 0, 0);
+
+       pci_hose_read_config_byte(hose, dev, PCI_CLASS_PROG, &prog_if);
+
+       return (prog_if == FSL_PROG_IF_AGENT);
+}
+
 int fsl_pci_init_port(struct fsl_pci_info *pci_info,
-                       struct pci_controller *hose, int busno, int pcie_ep)
+                       struct pci_controller *hose, int busno)
 {
        volatile ccsr_fsl_pci_t *pci;
        struct pci_region *r;
 
        pci = (ccsr_fsl_pci_t *) pci_info->regs;
 
-       if (pcie_ep) {
-               volatile pit_t *pi = &pci->pit[2];
-
-               pci_setup_indirect(hose, (u32)&pci->cfg_addr,
-                                        (u32)&pci->cfg_data);
-               out_be32(&pi->pitar, 0);
-               out_be32(&pi->piwbar, 0);
-               out_be32(&pi->piwar, PIWAR_EN | PIWAR_LOCAL |
-                       PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP | PIWAR_IWS_4K);
-
-               fsl_pci_config_unlock(hose);
-               return 0;
-       }
-
        /* on non-PCIe controllers we don't have pme_msg_det so this code
         * should do nothing since the read will return 0
         */
@@ -464,6 +461,11 @@ int fsl_pci_init_port(struct fsl_pci_info *pci_info,
 
        fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
 
+       if (fsl_is_pci_agent(hose)) {
+               fsl_pci_config_unlock(hose);
+               hose->last_busno = hose->first_busno;
+       }
+
        printf("    PCIE%x on bus %02x - %02x\n", pci_info->pci_num,
                        hose->first_busno, hose->last_busno);
 
index d644df7526777c6fbb6eba3a50892df575eb102e..44593a8949038d18f566a821b6c0d99161de43a5 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef _ASM_ARM_UNALIGNED_H
 #define _ASM_ARM_UNALIGNED_H
 
-#include <linux/unaligned/access_ok.h>
+#include <linux/unaligned/le_byteshift.h>
+#include <linux/unaligned/be_byteshift.h>
 #include <linux/unaligned/generic.h>
 
 /*
index 6b0c89bd3f304d9a6a6be53c98649093261e2b23..a5f72f5cd5f2591b81d91a2ef061a98c452e6cee 100644 (file)
@@ -25,6 +25,7 @@
 int is_fsl_pci_agent(enum law_trgt_if trgt, u32 host_agent);
 int is_fsl_pci_cfg(enum law_trgt_if trgt, u32 io_sel);
 
+int fsl_is_pci_agent(struct pci_controller *hose);
 void fsl_pci_init(struct pci_controller *hose, u32 cfg_addr, u32 cfg_data);
 void fsl_pci_config_unlock(struct pci_controller *hose);
 void ft_fsl_pci_setup(void *blob, const char *pci_alias,
@@ -62,7 +63,6 @@ typedef struct pci_inbound_window {
 #define PIWAR_LOCAL            0x00f00000
 #define PIWAR_READ_SNOOP       0x00050000
 #define PIWAR_WRITE_SNOOP      0x00005000
-#define PIWAR_IWS_4K           0x0000000b
        u32     res2[3];
 } pit_t;
 
@@ -172,7 +172,7 @@ struct fsl_pci_info {
 };
 
 int fsl_pci_init_port(struct fsl_pci_info *pci_info,
-                       struct pci_controller *hose, int busno, int pcie_ep);
+                               struct pci_controller *hose, int busno);
 
 #define SET_STD_PCI_INFO(x, num) \
 {                      \
index 3dddccfe7e681bc51122c1677f31f484c6ac68ff..ac9b3c5053d90cf159551afe028dc22e2f8c5244 100644 (file)
 #define CONFIG_SYS_EBC_PB1CR           (CONFIG_SYS_FPGA_BASE | 0x3a000) /* BAS=FPGA,BS=2MB,BU=R/W,BW=16bit*/
 #endif /* !defined(CONFIG_ARCHES) */
 
-#define CONFIG_SYS_EBC_CFG             0xB8400000              /*  EBC0_CFG */
+#define CONFIG_SYS_EBC_CFG             0xbfc00000
 
 /*
  * Arches doesn't use PerCS3 but GPIO43, so let's configure the GPIO
index 4dea27d48309ead0c29d1816eed272c054e5d7dd..7bef1195d34631004edbbe8ebc57e5d4da6c4281 100644 (file)
 /* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE */
 
 #define CONFIG_SYS_BR0_PRELIM          (CONFIG_SYS_FLASH_BASE |        /* flash Base address */ \
-                               (2 << BR_PS_SHIFT) |    /* 32 bit port size */   \
+                               (2 << BR_PS_SHIFT) |    /* 16 bit port size */   \
                                BR_V)                   /* valid */
 
 #define CONFIG_SYS_OR0_PRELIM          0xFF806FF7      /* 8 MB flash size */
diff --git a/include/linux/unaligned/be_byteshift.h b/include/linux/unaligned/be_byteshift.h
new file mode 100644 (file)
index 0000000..9356b24
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef _LINUX_UNALIGNED_BE_BYTESHIFT_H
+#define _LINUX_UNALIGNED_BE_BYTESHIFT_H
+
+#include <linux/types.h>
+
+static inline u16 __get_unaligned_be16(const u8 *p)
+{
+       return p[0] << 8 | p[1];
+}
+
+static inline u32 __get_unaligned_be32(const u8 *p)
+{
+       return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
+}
+
+static inline u64 __get_unaligned_be64(const u8 *p)
+{
+       return (u64)__get_unaligned_be32(p) << 32 |
+              __get_unaligned_be32(p + 4);
+}
+
+static inline void __put_unaligned_be16(u16 val, u8 *p)
+{
+       *p++ = val >> 8;
+       *p++ = val;
+}
+
+static inline void __put_unaligned_be32(u32 val, u8 *p)
+{
+       __put_unaligned_be16(val >> 16, p);
+       __put_unaligned_be16(val, p + 2);
+}
+
+static inline void __put_unaligned_be64(u64 val, u8 *p)
+{
+       __put_unaligned_be32(val >> 32, p);
+       __put_unaligned_be32(val, p + 4);
+}
+
+static inline u16 get_unaligned_be16(const void *p)
+{
+       return __get_unaligned_be16((const u8 *)p);
+}
+
+static inline u32 get_unaligned_be32(const void *p)
+{
+       return __get_unaligned_be32((const u8 *)p);
+}
+
+static inline u64 get_unaligned_be64(const void *p)
+{
+       return __get_unaligned_be64((const u8 *)p);
+}
+
+static inline void put_unaligned_be16(u16 val, void *p)
+{
+       __put_unaligned_be16(val, p);
+}
+
+static inline void put_unaligned_be32(u32 val, void *p)
+{
+       __put_unaligned_be32(val, p);
+}
+
+static inline void put_unaligned_be64(u64 val, void *p)
+{
+       __put_unaligned_be64(val, p);
+}
+
+#endif /* _LINUX_UNALIGNED_BE_BYTESHIFT_H */
diff --git a/include/linux/unaligned/le_byteshift.h b/include/linux/unaligned/le_byteshift.h
new file mode 100644 (file)
index 0000000..be376fb
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef _LINUX_UNALIGNED_LE_BYTESHIFT_H
+#define _LINUX_UNALIGNED_LE_BYTESHIFT_H
+
+#include <linux/types.h>
+
+static inline u16 __get_unaligned_le16(const u8 *p)
+{
+       return p[0] | p[1] << 8;
+}
+
+static inline u32 __get_unaligned_le32(const u8 *p)
+{
+       return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
+}
+
+static inline u64 __get_unaligned_le64(const u8 *p)
+{
+       return (u64)__get_unaligned_le32(p + 4) << 32 |
+              __get_unaligned_le32(p);
+}
+
+static inline void __put_unaligned_le16(u16 val, u8 *p)
+{
+       *p++ = val;
+       *p++ = val >> 8;
+}
+
+static inline void __put_unaligned_le32(u32 val, u8 *p)
+{
+       __put_unaligned_le16(val >> 16, p + 2);
+       __put_unaligned_le16(val, p);
+}
+
+static inline void __put_unaligned_le64(u64 val, u8 *p)
+{
+       __put_unaligned_le32(val >> 32, p + 4);
+       __put_unaligned_le32(val, p);
+}
+
+static inline u16 get_unaligned_le16(const void *p)
+{
+       return __get_unaligned_le16((const u8 *)p);
+}
+
+static inline u32 get_unaligned_le32(const void *p)
+{
+       return __get_unaligned_le32((const u8 *)p);
+}
+
+static inline u64 get_unaligned_le64(const void *p)
+{
+       return __get_unaligned_le64((const u8 *)p);
+}
+
+static inline void put_unaligned_le16(u16 val, void *p)
+{
+       __put_unaligned_le16(val, p);
+}
+
+static inline void put_unaligned_le32(u32 val, void *p)
+{
+       __put_unaligned_le32(val, p);
+}
+
+static inline void put_unaligned_le64(u64 val, void *p)
+{
+       __put_unaligned_le64(val, p);
+}
+
+#endif /* _LINUX_UNALIGNED_LE_BYTESHIFT_H */
index 72713a8fec7aebd8db2e15a300efee93343dc6b3..5d2fb2ec4afd849d23ec661588b2cdbf3826049b 100644 (file)
@@ -49,7 +49,6 @@ DECLARE_GLOBAL_DATA_PTR;
  */
 
 
-extern void malloc_bin_reloc (void);
 typedef int (init_fnc_t) (void);
 
 
@@ -115,7 +114,6 @@ void board_init (void)
 
        /* The Malloc area is immediately below the monitor copy in RAM */
        mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN);
-       malloc_bin_reloc();
 
        WATCHDOG_RESET ();
        bd->bi_flashsize = flash_init();
index c6b36f4a2ef1e35903c535abfab261d743627d1c..008f04f956277ddabe75cca2850c38e5d51ac306 100644 (file)
@@ -52,7 +52,6 @@ DECLARE_GLOBAL_DATA_PTR;
  */
 
 
-extern void malloc_bin_reloc (void);
 typedef int (init_fnc_t) (void);
 
 
@@ -121,7 +120,6 @@ void board_init (void)
 
        /* The Malloc area is immediately below the monitor copy in RAM */
        mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN);
-       malloc_bin_reloc();
 
        WATCHDOG_RESET ();
        bd->bi_flashsize = flash_init();
index 5ed40e922b25d049c2c38b31d0fa2c47c0351989..c97e20c3e1cfc3f3a7cc2506835c59e3071c5562 100644 (file)
@@ -32,7 +32,6 @@
 #include <miiphy.h>
 #endif
 
-extern void malloc_bin_reloc (void);
 extern int cpu_init(void);
 extern int board_init(void);
 extern int dram_init(void);
@@ -92,7 +91,6 @@ static int sh_mem_env_init(void)
 {
        mem_malloc_init(TEXT_BASE - CONFIG_SYS_GBL_DATA_SIZE -
                        CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN - 16);
-       malloc_bin_reloc();
        env_relocate();
        jumptable_init();
        return 0;
index 7f14a6fe458c5dd93b4d88addac669817be63a24..ff47d55311e21cc57b42d8808c972a11f3668a97 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/immap_83xx.h>
 #include <asm/fsl_lbc.h>
 #include <linux/mtd/nand.h>