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

Commit 0f08f338 authored by Paul Mundt's avatar Paul Mundt
Browse files

sh: More cosmetic cleanups and trivial fixes.



Nothing exciting here, just trivial fixes..

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 9e3043c0
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -80,21 +80,23 @@ static irqreturn_t dma_tei(int irq, void *dev_id, struct pt_regs *regs)


static int sh_dmac_request_dma(struct dma_channel *chan)
static int sh_dmac_request_dma(struct dma_channel *chan)
{
{
	char name[32];

	if (unlikely(!chan->flags & DMA_TEI_CAPABLE))
	if (unlikely(!chan->flags & DMA_TEI_CAPABLE))
		return 0;
		return 0;


	snprintf(name, sizeof(name), "DMAC Transfer End (Channel %d)",
	chan->name = kzalloc(32, GFP_KERNEL);
	if (unlikely(chan->name == NULL))
		return -ENOMEM;
	snprintf(chan->name, 32, "DMAC Transfer End (Channel %d)",
		 chan->chan);
		 chan->chan);


	return request_irq(get_dmte_irq(chan->chan), dma_tei,
	return request_irq(get_dmte_irq(chan->chan), dma_tei,
			   IRQF_DISABLED, name, chan);
			   IRQF_DISABLED, chan->name, chan);
}
}


static void sh_dmac_free_dma(struct dma_channel *chan)
static void sh_dmac_free_dma(struct dma_channel *chan)
{
{
	free_irq(get_dmte_irq(chan->chan), chan);
	free_irq(get_dmte_irq(chan->chan), chan);
	kfree(chan->name);
}
}


static void
static void
+1 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/titan.h>
#include <asm/titan.h>
#include "pci-sh4.h"
#include "pci-sh4.h"
+1 −1
Original line number Original line Diff line number Diff line
@@ -507,7 +507,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
	 * unified cache on the SH-2 and SH-3, as well as the harvard
	 * unified cache on the SH-2 and SH-3, as well as the harvard
	 * style cache on the SH-4.
	 * style cache on the SH-4.
	 */
	 */
	if (test_bit(SH_CACHE_COMBINED, &(boot_cpu_data.icache.flags))) {
	if (boot_cpu_data.icache.flags & SH_CACHE_COMBINED) {
		seq_printf(m, "unified\n");
		seq_printf(m, "unified\n");
		show_cacheinfo(m, "cache", boot_cpu_data.icache);
		show_cacheinfo(m, "cache", boot_cpu_data.icache);
	} else {
	} else {
+0 −15
Original line number Original line Diff line number Diff line
@@ -27,20 +27,11 @@ EXPORT_SYMBOL(sh_mv);


/* platform dependent support */
/* platform dependent support */
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(probe_irq_mask);
EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(disable_irq_nosync);
EXPORT_SYMBOL(irq_desc);
EXPORT_SYMBOL(irq_desc);
EXPORT_SYMBOL(no_irq_type);
EXPORT_SYMBOL(no_irq_type);


EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strcat);
EXPORT_SYMBOL(strncat);


/* PCI exports */
/* PCI exports */
#ifdef CONFIG_PCI
#ifdef CONFIG_PCI
@@ -51,13 +42,8 @@ EXPORT_SYMBOL(pci_free_consistent);
/* mem exports */
/* mem exports */
EXPORT_SYMBOL(memchr);
EXPORT_SYMBOL(memchr);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memcpy_fromio);
EXPORT_SYMBOL(memcpy_toio);
EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memset_io);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(memcmp);
EXPORT_SYMBOL(memscan);
EXPORT_SYMBOL(__copy_user);
EXPORT_SYMBOL(__copy_user);
EXPORT_SYMBOL(boot_cpu_data);
EXPORT_SYMBOL(boot_cpu_data);


@@ -124,5 +110,4 @@ EXPORT_SYMBOL(csum_partial);
#ifdef CONFIG_IPV6
#ifdef CONFIG_IPV6
EXPORT_SYMBOL(csum_ipv6_magic);
EXPORT_SYMBOL(csum_ipv6_magic);
#endif
#endif
EXPORT_SYMBOL(consistent_sync);
EXPORT_SYMBOL(clear_page);
EXPORT_SYMBOL(clear_page);
+6 −13
Original line number Original line Diff line number Diff line
@@ -9,7 +9,6 @@
 * for more details.
 * for more details.
 *
 *
 */
 */

#include <linux/init.h>
#include <linux/init.h>
#include <linux/mman.h>
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/mm.h>
@@ -25,14 +24,10 @@
#include <asm/mmu_context.h>
#include <asm/mmu_context.h>
#include <asm/cacheflush.h>
#include <asm/cacheflush.h>


/* The 32KB cache on the SH7705 suffers from the same synonym problem
/*
 * as SH4 CPUs */
 * The 32KB cache on the SH7705 suffers from the same synonym problem

 * as SH4 CPUs
#define __pte_offset(address) \
 */
		((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
#define pte_offset(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \
		__pte_offset(address))

static inline void cache_wback_all(void)
static inline void cache_wback_all(void)
{
{
	unsigned long ways, waysize, addrstart;
	unsigned long ways, waysize, addrstart;
@@ -73,7 +68,6 @@ void flush_icache_range(unsigned long start, unsigned long end)
	__flush_wback_region((void *)start, end - start);
	__flush_wback_region((void *)start, end - start);
}
}



/*
/*
 * Writeback&Invalidate the D-cache of the page
 * Writeback&Invalidate the D-cache of the page
 */
 */
@@ -128,7 +122,6 @@ static void __flush_dcache_page(unsigned long phys)
	local_irq_restore(flags);
	local_irq_restore(flags);
}
}



/*
/*
 * Write back & invalidate the D-cache of the page.
 * Write back & invalidate the D-cache of the page.
 * (To avoid "alias" issues)
 * (To avoid "alias" issues)
@@ -186,7 +179,8 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
 *
 *
 * ADDRESS: Virtual Address (U0 address)
 * ADDRESS: Virtual Address (U0 address)
 */
 */
void flush_cache_page(struct vm_area_struct *vma, unsigned long address, unsigned long pfn)
void flush_cache_page(struct vm_area_struct *vma, unsigned long address,
		      unsigned long pfn)
{
{
	__flush_dcache_page(pfn << PAGE_SHIFT);
	__flush_dcache_page(pfn << PAGE_SHIFT);
}
}
@@ -203,4 +197,3 @@ void flush_icache_page(struct vm_area_struct *vma, struct page *page)
{
{
	__flush_purge_region(page_address(page), PAGE_SIZE);
	__flush_purge_region(page_address(page), PAGE_SIZE);
}
}
Loading