Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21264136 authored by Paul Mundt's avatar Paul Mundt
Browse files

sh64: Trivial build fixes.



While we've been sorting out the toolchain fiasco, some of
the code has suffered a bit of bitrot. Building with GCC4
also brings up some more build warnings. Trivial fixes for
both issues.

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent ccdfc526
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -112,8 +112,10 @@ struct resource io_resources[] = {
};

struct resource kram_resources[] = {
	{ "Kernel code", 0, 0 },	/* These must be last in the array */
	{ "Kernel data", 0, 0 }		/* These must be last in the array */
	/* These must be last in the array */
	{ .name = "Kernel code", .start = 0, .end = 0 },
	/* These must be last in the array */
	{ .name = "Kernel data", .start = 0, .end = 0 }
};

struct resource xram_resources[] = {
+3 −1
Original line number Diff line number Diff line
@@ -449,7 +449,9 @@ ioremap_proc_info(char *buf, char **start, off_t fpos, int length, int *eof,
		if (p + 32 >= e)        /* Better than nothing */
			break;
		if ((nm = r->name) == 0) nm = "???";
		p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm);
		p += sprintf(p, "%08lx-%08lx: %s\n",
			     (unsigned long)r->start,
			     (unsigned long)r->end, nm);
	}

	return p-buf;
+2 −2
Original line number Diff line number Diff line
@@ -1579,7 +1579,7 @@ static int __init serial_console_setup(struct console *co, char *options)
	h8300_sci_enable(port, sci_enable);
#endif
#elif defined(CONFIG_SUPERH64)
	port->uartclk = current_cpu_info.module_clock * 16;
	port->uartclk = current_cpu_data.module_clock * 16;
#else
	{
		struct clk *clk = clk_get("module_clk");
@@ -1720,7 +1720,7 @@ static int __init sci_init(void)
#if defined(__H8300H__) || defined(__H8300S__)
			sciport->port.uartclk = CONFIG_CPU_CLOCK;
#elif defined(CONFIG_SUPERH64)
			sciport->port.uartclk = current_cpu_info.module_clock * 16;
			sciport->port.uartclk = current_cpu_data.module_clock * 16;
#else
			struct clk *clk = clk_get("module_clk");
			sciport->port.uartclk = clk_get_rate(clk) * 16;
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@

#include <asm/types.h>

static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
{
	__asm__("byterev	%0, %0\n\t"
		"shari		%0, 32, %0"
@@ -23,7 +23,7 @@ static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
	return x;
}

static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
{
	__asm__("byterev	%0, %0\n\t"
		"shari		%0, 48, %0"
+12 −4
Original line number Diff line number Diff line
@@ -126,22 +126,30 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
static inline void dma_sync_single_for_cpu(struct device *dev,
					   dma_addr_t dma_handle, size_t size,
					   enum dma_data_direction dir)
	__attribute__ ((alias("dma_sync_single")));
{
	dma_sync_single(dev, dma_handle, size, dir);
}

static inline void dma_sync_single_for_device(struct device *dev,
					   dma_addr_t dma_handle, size_t size,
					   enum dma_data_direction dir)
	__attribute__ ((alias("dma_sync_single")));
{
	dma_sync_single(dev, dma_handle, size, dir);
}

static inline void dma_sync_sg_for_cpu(struct device *dev,
				       struct scatterlist *sg, int nelems,
				       enum dma_data_direction dir)
	__attribute__ ((alias("dma_sync_sg")));
{
	dma_sync_sg(dev, sg, nelems, dir);
}

static inline void dma_sync_sg_for_device(struct device *dev,
				       struct scatterlist *sg, int nelems,
				       enum dma_data_direction dir)
	__attribute__ ((alias("dma_sync_sg")));
{
	dma_sync_sg(dev, sg, nelems, dir);
}

static inline int dma_get_cache_alignment(void)
{
Loading