Skip to content

Commit 60e76bb

Browse files
committed
Merge tag 'm68knommu-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu updates from Greg Ungerer: "Fixes include: - cleanup compiler warnings (IO access functions and unused variables) - ColdFire v3 cache control fix - ColdFire MMU comment cleanup - switch to using asm-generic cmpxchg_local() - stmark platform updates" * tag 'm68knommu-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: stmark2: enable edma support for dspi m68k: use asm-generic cmpxchg_local() m68k: mcfmmu: remove stale part of comment about steal_context m68knommu: fix overwriting of bits in ColdFire V3 cache control m68k: fix ColdFire mmu init compile warning m68knommu: fix use of cpu_to_le() on IO access m68knommu: __force type casts for raw IO access m68k: stmark2: defconfig updates
2 parents dbf8381 + fde87eb commit 60e76bb

File tree

6 files changed

+45
-47
lines changed

6 files changed

+45
-47
lines changed

arch/m68k/coldfire/stmark2.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/spi/spi.h>
1414
#include <linux/spi/spi-fsl-dspi.h>
1515
#include <linux/spi/flash.h>
16+
#include <linux/dma-mapping.h>
1617
#include <asm/mcfsim.h>
1718

1819
/*
@@ -78,6 +79,8 @@ static struct resource dspi_spi0_resource[] = {
7879
},
7980
};
8081

82+
static u64 stmark2_dspi_mask = DMA_BIT_MASK(32);
83+
8184
/* SPI controller, id = bus number */
8285
static struct platform_device dspi_spi0_device = {
8386
.name = "fsl-dspi",
@@ -86,6 +89,8 @@ static struct platform_device dspi_spi0_device = {
8689
.resource = dspi_spi0_resource,
8790
.dev = {
8891
.platform_data = &dspi_spi0_info,
92+
.dma_mask = &stmark2_dspi_mask,
93+
.coherent_dma_mask = DMA_BIT_MASK(32),
8994
},
9095
};
9196

arch/m68k/configs/stmark2_defconfig

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,33 @@
11
CONFIG_LOCALVERSION="stmark2-001"
22
CONFIG_DEFAULT_HOSTNAME="stmark2"
33
CONFIG_SYSVIPC=y
4-
# CONFIG_FHANDLE is not set
54
CONFIG_LOG_BUF_SHIFT=14
65
CONFIG_NAMESPACES=y
76
CONFIG_BLK_DEV_INITRD=y
8-
# CONFIG_RD_BZIP2 is not set
9-
# CONFIG_RD_LZMA is not set
10-
# CONFIG_RD_XZ is not set
11-
# CONFIG_RD_LZO is not set
12-
# CONFIG_RD_LZ4 is not set
137
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
8+
# CONFIG_FHANDLE is not set
149
# CONFIG_AIO is not set
1510
# CONFIG_ADVISE_SYSCALLS is not set
1611
# CONFIG_MEMBARRIER is not set
1712
CONFIG_EMBEDDED=y
1813
# CONFIG_VM_EVENT_COUNTERS is not set
1914
# CONFIG_COMPAT_BRK is not set
20-
# CONFIG_BLK_DEV_BSG is not set
21-
CONFIG_BLK_CMDLINE_PARSER=y
22-
# CONFIG_MMU is not set
15+
CONFIG_COLDFIRE=y
2316
CONFIG_M5441x=y
2417
CONFIG_CLOCK_FREQ=240000000
2518
CONFIG_STMARK2=y
19+
CONFIG_UBOOT=y
2620
CONFIG_RAMBASE=0x40000000
2721
CONFIG_RAMSIZE=0x8000000
2822
CONFIG_VECTORBASE=0x40000000
2923
CONFIG_KERNELBASE=0x40001000
24+
# CONFIG_BLK_DEV_BSG is not set
25+
CONFIG_BLK_CMDLINE_PARSER=y
3026
CONFIG_BINFMT_FLAT=y
27+
CONFIG_BINFMT_ZFLAT=y
3128
CONFIG_BINFMT_MISC=y
32-
# CONFIG_UEVENT_HELPER is not set
3329
CONFIG_DEVTMPFS=y
3430
CONFIG_DEVTMPFS_MOUNT=y
35-
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
3631
# CONFIG_ALLOW_DEV_COREDUMP is not set
3732
CONFIG_MTD=y
3833
CONFIG_MTD_CMDLINE_PARTS=y
@@ -65,24 +60,36 @@ CONFIG_DEBUG_GPIO=y
6560
CONFIG_GPIO_SYSFS=y
6661
CONFIG_GPIO_GENERIC_PLATFORM=y
6762
# CONFIG_HWMON is not set
68-
# CONFIG_RC_CORE is not set
6963
# CONFIG_HID is not set
7064
# CONFIG_USB_SUPPORT is not set
65+
CONFIG_MMC=y
66+
CONFIG_MMC_DEBUG=y
67+
CONFIG_MMC_SDHCI=y
68+
CONFIG_MMC_SDHCI_PLTFM=y
69+
CONFIG_MMC_SDHCI_ESDHC_MCF=y
70+
CONFIG_DMADEVICES=y
71+
CONFIG_MCF_EDMA=y
72+
CONFIG_EXT2_FS=y
73+
CONFIG_EXT2_FS_XATTR=y
74+
CONFIG_EXT2_FS_POSIX_ACL=y
75+
CONFIG_EXT2_FS_SECURITY=y
76+
CONFIG_EXT3_FS=y
77+
CONFIG_EXT3_FS_POSIX_ACL=y
78+
CONFIG_EXT3_FS_SECURITY=y
7179
# CONFIG_FILE_LOCKING is not set
7280
# CONFIG_DNOTIFY is not set
7381
# CONFIG_INOTIFY_USER is not set
82+
CONFIG_OVERLAY_FS=y
7483
CONFIG_FSCACHE=y
7584
# CONFIG_PROC_SYSCTL is not set
85+
CONFIG_CRAMFS=y
86+
CONFIG_SQUASHFS=y
87+
CONFIG_ROMFS_FS=y
88+
CONFIG_CRYPTO_ANSI_CPRNG=y
89+
# CONFIG_CRYPTO_HW is not set
7690
CONFIG_PRINTK_TIME=y
91+
# CONFIG_DEBUG_BUGVERBOSE is not set
7792
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
7893
CONFIG_SLUB_DEBUG_ON=y
7994
CONFIG_PANIC_ON_OOPS=y
8095
# CONFIG_SCHED_DEBUG is not set
81-
# CONFIG_DEBUG_BUGVERBOSE is not set
82-
CONFIG_BOOTPARAM=y
83-
CONFIG_BOOTPARAM_STRING="console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/bin/init devtmpfs.mount=1"
84-
CONFIG_CRYPTO=y
85-
# CONFIG_CRYPTO_ECHAINIV is not set
86-
CONFIG_CRYPTO_ANSI_CPRNG=y
87-
# CONFIG_CRYPTO_HW is not set
88-
CONFIG_CRC16=y

arch/m68k/include/asm/cmpxchg.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,6 @@ static inline unsigned long __cmpxchg(volatile void *p, unsigned long old,
129129

130130
#else
131131

132-
/*
133-
* cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
134-
* them available.
135-
*/
136-
#define cmpxchg_local(ptr, o, n) \
137-
((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
138-
(unsigned long)(n), sizeof(*(ptr))))
139-
140132
#include <asm-generic/cmpxchg.h>
141133

142134
#endif

arch/m68k/include/asm/io_no.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
* that behavior here first before we include asm-generic/io.h.
1515
*/
1616
#define __raw_readb(addr) \
17-
({ unsigned char __v = (*(volatile unsigned char *) (addr)); __v; })
17+
({ u8 __v = (*(__force volatile u8 *) (addr)); __v; })
1818
#define __raw_readw(addr) \
19-
({ unsigned short __v = (*(volatile unsigned short *) (addr)); __v; })
19+
({ u16 __v = (*(__force volatile u16 *) (addr)); __v; })
2020
#define __raw_readl(addr) \
21-
({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; })
21+
({ u32 __v = (*(__force volatile u32 *) (addr)); __v; })
2222

23-
#define __raw_writeb(b, addr) (void)((*(volatile unsigned char *) (addr)) = (b))
24-
#define __raw_writew(b, addr) (void)((*(volatile unsigned short *) (addr)) = (b))
25-
#define __raw_writel(b, addr) (void)((*(volatile unsigned int *) (addr)) = (b))
23+
#define __raw_writeb(b, addr) (void)((*(__force volatile u8 *) (addr)) = (b))
24+
#define __raw_writew(b, addr) (void)((*(__force volatile u16 *) (addr)) = (b))
25+
#define __raw_writel(b, addr) (void)((*(__force volatile u32 *) (addr)) = (b))
2626

2727
#if defined(CONFIG_COLDFIRE)
2828
/*
@@ -67,15 +67,15 @@ static inline u16 readw(const volatile void __iomem *addr)
6767
{
6868
if (cf_internalio(addr))
6969
return __raw_readw(addr);
70-
return __le16_to_cpu(__raw_readw(addr));
70+
return swab16(__raw_readw(addr));
7171
}
7272

7373
#define readl readl
7474
static inline u32 readl(const volatile void __iomem *addr)
7575
{
7676
if (cf_internalio(addr))
7777
return __raw_readl(addr);
78-
return __le32_to_cpu(__raw_readl(addr));
78+
return swab32(__raw_readl(addr));
7979
}
8080

8181
#define writew writew
@@ -84,7 +84,7 @@ static inline void writew(u16 value, volatile void __iomem *addr)
8484
if (cf_internalio(addr))
8585
__raw_writew(value, addr);
8686
else
87-
__raw_writew(__cpu_to_le16(value), addr);
87+
__raw_writew(swab16(value), addr);
8888
}
8989

9090
#define writel writel
@@ -93,7 +93,7 @@ static inline void writel(u32 value, volatile void __iomem *addr)
9393
if (cf_internalio(addr))
9494
__raw_writel(value, addr);
9595
else
96-
__raw_writel(__cpu_to_le32(value), addr);
96+
__raw_writel(swab32(value), addr);
9797
}
9898

9999
#else

arch/m68k/include/asm/m53xxacr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@
8989
* coherency though in all cases. And for copyback caches we will need
9090
* to push cached data as well.
9191
*/
92-
#define CACHE_INIT CACR_CINVA
93-
#define CACHE_INVALIDATE CACR_CINVA
94-
#define CACHE_INVALIDATED CACR_CINVA
92+
#define CACHE_INIT (CACHE_MODE + CACR_CINVA - CACR_EC)
93+
#define CACHE_INVALIDATE (CACHE_MODE + CACR_CINVA)
94+
#define CACHE_INVALIDATED (CACHE_MODE + CACR_CINVA)
9595

9696
#define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \
9797
(0x000f0000) + \

arch/m68k/mm/mcfmmu.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ void __init paging_init(void)
3939
unsigned long address, size;
4040
unsigned long next_pgtable, bootmem_end;
4141
unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
42-
enum zone_type zone;
4342
int i;
4443

4544
empty_zero_page = (void *) memblock_alloc(PAGE_SIZE, PAGE_SIZE);
@@ -214,11 +213,6 @@ void __init cf_mmu_context_init(void)
214213

215214
/*
216215
* Steal a context from a task that has one at the moment.
217-
* This is only used on 8xx and 4xx and we presently assume that
218-
* they don't do SMP. If they do then thicfpgalloc.hs will have to check
219-
* whether the MM we steal is in use.
220-
* We also assume that this is only used on systems that don't
221-
* use an MMU hash table - this is true for 8xx and 4xx.
222216
* This isn't an LRU system, it just frees up each context in
223217
* turn (sort-of pseudo-random replacement :). This would be the
224218
* place to implement an LRU scheme if anyone was motivated to do it.

0 commit comments

Comments
 (0)