Commit ce4796d1 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25:
  sh: Fix up the sh64 build.
  sh: Fix up SH7710 VoIP-GW build.
  sh: Flag PMB support as EXPERIMENTAL.
  sh: Update r7780mp defconfig.
  fb: hitfb: Balance probe/remove section annotations.
  sh: hp6xx: Fix up hp6xx_apm build failure.
  fb: pvr2fb: Fix up remaining section mismatch.
  sh: Fix up section mismatches.
  sh: hp6xx: Correct APM output.
  sh: update se7780 defconfig
  sh: replace remaining __FUNCTION__ occurrences
  sh: export copy-page() to modules
  sh_ksyms_32.c update for gcc 4.3
  sh/mm/pg-sh7705.c must #include <linux/fs.h>
parents 46fbdf89 7b9726a7
......@@ -456,13 +456,6 @@ config SH_SECUREEDGE5410
This includes both the OEM SecureEdge products as well as the
SME product line.
config SH_7710VOIPGW
bool "SH7710-VOIP-GW"
depends on CPU_SUBTYPE_SH7710
help
Select this option to build a kernel for the SH7710 based
VOIP GW.
config SH_RTS7751R2D
bool "RTS7751R2D"
depends on CPU_SUBTYPE_SH7751R
......
......@@ -118,7 +118,6 @@ machdir-$(CONFIG_SH_EDOSK7705) += renesas/edosk7705
machdir-$(CONFIG_SH_HIGHLANDER) += renesas/r7780rp
machdir-$(CONFIG_SH_MIGOR) += renesas/migor
machdir-$(CONFIG_SH_SDK7780) += renesas/sdk7780
machdir-$(CONFIG_SH_7710VOIPGW) += renesas/sh7710voipgw
machdir-$(CONFIG_SH_X3PROTO) += renesas/x3proto
machdir-$(CONFIG_SH_SH4202_MICRODEV) += superh/microdev
machdir-$(CONFIG_SH_LANDISK) += landisk
......
......@@ -2,6 +2,7 @@
* bios-less APM driver for hp680
*
* Copyright 2005 (c) Andriy Skulysh <askulysh@gmail.com>
* Copyright 2008 (c) Kristoffer Ericson <kristoffer.ericson@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License.
......@@ -15,17 +16,19 @@
#include <asm/adc.h>
#include <asm/hp6xx.h>
#define SH7709_PGDR 0xa400012c
/* percentage values */
#define APM_CRITICAL 10
#define APM_LOW 30
/* resonably sane values */
#define HP680_BATTERY_MAX 898
#define HP680_BATTERY_MIN 486
#define HP680_BATTERY_AC_ON 1023
#define MODNAME "hp6x0_apm"
#define PGDR 0xa400012c
static void hp6x0_apm_get_power_status(struct apm_power_info *info)
{
int battery, backup, charging, percentage;
......@@ -38,17 +41,26 @@ static void hp6x0_apm_get_power_status(struct apm_power_info *info)
percentage = 100 * (battery - HP680_BATTERY_MIN) /
(HP680_BATTERY_MAX - HP680_BATTERY_MIN);
/* % of full battery */
info->battery_life = percentage;
/* We want our estimates in minutes */
info->units = 0;
/* Extremely(!!) rough estimate, we will replace this with a datalist later on */
info->time = (2 * battery);
info->ac_line_status = (battery > HP680_BATTERY_AC_ON) ?
APM_AC_ONLINE : APM_AC_OFFLINE;
pgdr = ctrl_inb(SH7709_PGDR);
pgdr = ctrl_inb(PGDR);
if (pgdr & PGDR_MAIN_BATTERY_OUT) {
info->battery_status = APM_BATTERY_STATUS_NOT_PRESENT;
info->battery_flag = 0x80;
} else if (charging < 8) {
info->battery_status = APM_BATTERY_STATUS_CHARGING;
info->battery_flag = 0x08;
info->ac_line_status = 0xff;
info->ac_line_status = 0x01;
} else if (percentage <= APM_CRITICAL) {
info->battery_status = APM_BATTERY_STATUS_CRITICAL;
info->battery_flag = 0x04;
......@@ -59,8 +71,6 @@ static void hp6x0_apm_get_power_status(struct apm_power_info *info)
info->battery_status = APM_BATTERY_STATUS_HIGH;
info->battery_flag = 0x01;
}
info->units = 0;
}
static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
......
/*
* Renesas Technology SH7710 VoIP Gateway
*
* Copyright (C) 2006 Ranjit Deshpande
* Kenati Technologies Inc.
*
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
*/
#include <linux/init.h>
#include <asm/machvec.h>
#include <asm/irq.h>
#include <asm/io.h>
static struct ipr_data sh7710voipgw_ipr_map[] = {
{ TIMER2_IRQ, TIMER2_IPR_ADDR, TIMER2_IPR_POS, TIMER2_PRIORITY },
{ WDT_IRQ, WDT_IPR_ADDR, WDT_IPR_POS, WDT_PRIORITY },
/* SCIF0 */
{ SCIF0_ERI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY },
{ SCIF0_RXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY },
{ SCIF0_BRI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY },
{ SCIF0_TXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY },
/* DMAC-1 */
{ DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
{ DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
{ DMTE2_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
{ DMTE3_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY },
/* DMAC-2 */
{ DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY },
{ DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY },
/* IPSEC */
{ IPSEC_IRQ, IPSEC_IPR_ADDR, IPSEC_IPR_POS, IPSEC_PRIORITY },
/* EDMAC */
{ EDMAC0_IRQ, EDMAC0_IPR_ADDR, EDMAC0_IPR_POS, EDMAC0_PRIORITY },
{ EDMAC1_IRQ, EDMAC1_IPR_ADDR, EDMAC1_IPR_POS, EDMAC1_PRIORITY },
{ EDMAC2_IRQ, EDMAC2_IPR_ADDR, EDMAC2_IPR_POS, EDMAC2_PRIORITY },
/* SIOF0 */
{ SIOF0_ERI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY },
{ SIOF0_TXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY },
{ SIOF0_RXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY },
{ SIOF0_CCI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY },
/* SIOF1 */
{ SIOF1_ERI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY },
{ SIOF1_TXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY },
{ SIOF1_RXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY },
{ SIOF1_CCI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY },
/* SLIC IRQ's */
{ IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY },
{ IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY },
};
/*
* Initialize IRQ setting
*/
static void __init sh7710voipgw_init_irq(void)
{
/* Disable all interrupts in IPR registers */
ctrl_outw(0x0, INTC_IPRA);
ctrl_outw(0x0, INTC_IPRB);
ctrl_outw(0x0, INTC_IPRC);
ctrl_outw(0x0, INTC_IPRD);
ctrl_outw(0x0, INTC_IPRE);
ctrl_outw(0x0, INTC_IPRF);
ctrl_outw(0x0, INTC_IPRG);
ctrl_outw(0x0, INTC_IPRH);
ctrl_outw(0x0, INTC_IPRI);
/* Ack all interrupt sources in the IRR0 register */
ctrl_outb(0x3f, INTC_IRR0);
/* Use IRQ0 - IRQ3 as active low interrupt lines i.e. disable
* IRL mode.
*/
ctrl_outw(0x2aa, INTC_ICR1);
make_ipr_irq(sh7710voipgw_ipr_map, ARRAY_SIZE(sh7710voipgw_ipr_map));
}
/*
* The Machine Vector
*/
static struct sh_machine_vector mv_sh7710voipgw __initmv = {
.mv_name = "SH7710 VoIP Gateway",
.mv_nr_irqs = 104,
.mv_init_irq = sh7710voipgw_init_irq,
};
......@@ -68,7 +68,7 @@ static void __ilsel_enable(ilsel_source_t set, unsigned int bit)
shift = mk_ilsel_shift(bit);
pr_debug("%s: bit#%d: addr - 0x%08lx (shift %d, set %d)\n",
__FUNCTION__, bit, addr, shift, set);
__func__, bit, addr, shift, set);
tmp = ctrl_inw(addr);
tmp &= ~(0xf << shift);
......
......@@ -127,7 +127,7 @@ static unsigned long microdev_isa_port2addr(unsigned long offset)
* safe default.
*/
printk("Warning: unexpected port in %s( offset = 0x%lx )\n",
__FUNCTION__, offset);
__func__, offset);
result = PVR;
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -233,7 +233,7 @@ static void __init dsp_init(void)
* and cache configuration in detect_cpu_and_cache_system().
*/
asmlinkage void __cpuinit sh_cpu_init(void)
asmlinkage void __init sh_cpu_init(void)
{
current_thread_info()->cpu = hard_smp_processor_id();
......
......@@ -216,7 +216,7 @@ void sq_unmap(unsigned long vaddr)
if (unlikely(!map)) {
printk("%s: bad store queue address 0x%08lx\n",
__FUNCTION__, vaddr);
__func__, vaddr);
return;
}
......@@ -233,7 +233,7 @@ void sq_unmap(unsigned long vaddr)
vma = remove_vm_area((void *)(map->sq_addr & PAGE_MASK));
if (!vma) {
printk(KERN_ERR "%s: bad address 0x%08lx\n",
__FUNCTION__, map->sq_addr);
__func__, map->sq_addr);
return;
}
}
......
......@@ -149,7 +149,7 @@ static int lookup_prev_stack_frame(unsigned long fp, unsigned long pc,
if (dest >= 63) {
printk(KERN_NOTICE "%s: Invalid dest reg %d "
"specified in movi handler. Failed "
"opcode was 0x%lx: ", __FUNCTION__,
"opcode was 0x%lx: ", __func__,
dest, op);
continue;
......
......@@ -32,7 +32,7 @@ EXPORT_SYMBOL_GPL(trapped_mem);
#endif
static DEFINE_SPINLOCK(trapped_lock);
int __init register_trapped_io(struct trapped_io *tiop)
int register_trapped_io(struct trapped_io *tiop)
{
struct resource *res;
unsigned long len = 0, flags = 0;
......
......@@ -111,9 +111,9 @@ DECLARE_EXPORT(__movmem_i4_even);
DECLARE_EXPORT(__movmem_i4_odd);
DECLARE_EXPORT(__movmemSI12_i4);
#if (__GNUC_MINOR__ == 2 || defined(__GNUC_STM_RELEASE__))
#if (__GNUC_MINOR__ >= 2 || defined(__GNUC_STM_RELEASE__))
/*
* GCC 4.2 emits these for division, as do GCC 4.1.x versions of the ST
* GCC >= 4.2 emits these for division, as do GCC 4.1.x versions of the ST
* compiler which include backported patches.
*/
DECLARE_EXPORT(__sdivsi3_i4i);
......@@ -146,5 +146,6 @@ EXPORT_SYMBOL(csum_partial_copy_generic);
EXPORT_SYMBOL(csum_ipv6_magic);
#endif
EXPORT_SYMBOL(clear_page);
EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(__clear_user);
EXPORT_SYMBOL(_ebss);
......@@ -42,6 +42,7 @@ EXPORT_SYMBOL(__down_trylock);
EXPORT_SYMBOL(__up);
EXPORT_SYMBOL(__put_user_asm_l);
EXPORT_SYMBOL(__get_user_asm_l);
EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(__copy_user);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(__udelay);
......
......@@ -77,7 +77,7 @@ static unsigned long cmt_timer_get_offset(void)
count -= LATCH;
} else {
printk("%s (): hardware timer problem?\n",
__FUNCTION__);
__func__);
}
}
} else
......
......@@ -76,7 +76,7 @@ static unsigned long mtu2_timer_get_offset(void)
count -= LATCH;
} else {
printk("%s (): hardware timer problem?\n",
__FUNCTION__);
__func__);
}
}
} else
......
......@@ -29,7 +29,7 @@ static int __init topology_init(void)
ret = register_cpu(&per_cpu(cpu_devices, i), i);
if (unlikely(ret))
printk(KERN_WARNING "%s: register_cpu %d failed (%d)\n",
__FUNCTION__, i, ret);
__func__, i, ret);
}
#if defined(CONFIG_NUMA) && !defined(CONFIG_SMP)
......
......@@ -238,7 +238,7 @@ DO_ERROR(12, SIGILL, "reserved instruction", reserved_inst, current)
/* Called with interrupts disabled */
asmlinkage void do_exception_error(unsigned long ex, struct pt_regs *regs)
{
show_excp_regs(__FUNCTION__, -1, -1, regs);
show_excp_regs(__func__, -1, -1, regs);
die_if_kernel("exception", regs, ex);
}
......
......@@ -207,7 +207,7 @@ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
result = (result & 0xffffffff) + (result >> 32);
pr_debug("%s saddr %x daddr %x len %x proto %x sum %x result %08Lx\n",
__FUNCTION__, saddr, daddr, len, proto, sum, result);
__func__, saddr, daddr, len, proto, sum, result);
return (__wsum)result;
}
......
......@@ -21,7 +21,7 @@
* a 1GHz box, that's about 2 seconds.
*/
void __delay(int loops)
void __delay(unsigned long loops)
{
long long dummy;
__asm__ __volatile__("gettr tr0, %1\n\t"
......@@ -33,24 +33,17 @@ void __delay(int loops)
:"0"(loops));
}
void __udelay(unsigned long long usecs, unsigned long lpj)
inline void __const_udelay(unsigned long xloops)
{
usecs *= (((unsigned long long) HZ << 32) / 1000000) * lpj;
__delay((long long) usecs >> 32);
__delay(xloops * (HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy));
}
void __ndelay(unsigned long long nsecs, unsigned long lpj)
void __udelay(unsigned long usecs)
{
nsecs *= (((unsigned long long) HZ << 32) / 1000000000) * lpj;
__delay((long long) nsecs >> 32);
__const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */
}
void udelay(unsigned long usecs)
void __ndelay(unsigned long nsecs)
{
__udelay(usecs, cpu_data[raw_smp_processor_id()].loops_per_jiffy);
}
void ndelay(unsigned long nsecs)
{
__ndelay(nsecs, cpu_data[raw_smp_processor_id()].loops_per_jiffy);
__const_udelay(nsecs * 0x00000005);
}
......@@ -59,7 +59,7 @@ config 32BIT
config PMB
bool "Support 32-bit physical addressing through PMB"
depends on MMU && (CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
select 32BIT
default y
help
......
......@@ -328,7 +328,7 @@ int arch_add_memory(int nid, u64 start, u64 size)
/* We only have ZONE_NORMAL, so this is easy.. */
ret = __add_pages(pgdat->node_zones + ZONE_NORMAL, start_pfn, nr_pages);
if (unlikely(ret))
printk("%s: Failed, __add_pages() == %d\n", __FUNCTION__, ret);
printk("%s: Failed, __add_pages() == %d\n", __func__, ret);
return ret;
}
......
......@@ -141,7 +141,7 @@ void __iounmap(void __iomem *addr)
p = remove_vm_area((void *)(vaddr & PAGE_MASK));
if (!p) {
printk(KERN_ERR "%s: bad address %p\n", __FUNCTION__, addr);
printk(KERN_ERR "%s: bad address %p\n", __func__, addr);
return;
}
......
......@@ -178,7 +178,7 @@ static unsigned long shmedia_alloc_io(unsigned long phys, unsigned long size,
} else {
if (!printed_full) {
printk("%s: done with statics, switching to kmalloc\n",
__FUNCTION__);
__func__);
printed_full = 1;
}
tlen = strlen(name);
......@@ -352,7 +352,7 @@ void onchip_unmap(unsigned long vaddr)
res = shmedia_find_resource(&shmedia_iomap, vaddr);
if (!res) {
printk(KERN_ERR "%s: Failed to free 0x%08lx\n",
__FUNCTION__, vaddr);
__func__, vaddr);
return;
}
......
......@@ -14,6 +14,7 @@
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/threads.h>
#include <linux/fs.h>
#include <asm/addrspace.h>
#include <asm/page.h>
#include <asm/pgtable.h>
......
......@@ -131,7 +131,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
#ifdef DEBUG_FAULT
print_task(tsk);
printk("%s:%d fault, address is 0x%08x PC %016Lx textaccess %d writeaccess %d\n",
__FUNCTION__,__LINE__,
__func__, __LINE__,
address,regs->pc,textaccess,writeaccess);
show_regs(regs);
#endif
......@@ -145,7 +145,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
#ifdef DEBUG_FAULT
print_task(tsk);
printk("%s:%d fault, address is 0x%08x PC %016Lx textaccess %d writeaccess %d\n",
__FUNCTION__,__LINE__,
__func__, __LINE__,
address,regs->pc,textaccess,writeaccess);
show_regs(regs);
......@@ -157,7 +157,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
#ifdef DEBUG_FAULT
print_task(tsk);
printk("%s:%d fault, address is 0x%08x PC %016Lx textaccess %d writeaccess %d\n",
__FUNCTION__,__LINE__,
__func__, __LINE__,
address,regs->pc,textaccess,writeaccess);
show_regs(regs);
#endif
......
......@@ -38,7 +38,6 @@ R7780MP SH_R7780MP
R7785RP SH_R7785RP
TITAN SH_TITAN
SHMIN SH_SHMIN
7710VOIPGW SH_7710VOIPGW
LBOXRE2 SH_LBOX_RE2
X3PROTO SH_X3PROTO
MAGICPANELR2 SH_MAGIC_PANEL_R2
......
......@@ -403,7 +403,7 @@ static int __init hitfb_probe(struct platform_device *dev)
return 0;
}
static int __devexit hitfb_remove(struct platform_device *dev)
static int __exit hitfb_remove(struct platform_device *dev)
{
return unregister_framebuffer(&fb_info);
}
......@@ -439,7 +439,7 @@ static int hitfb_resume(struct platform_device *dev)
static struct platform_driver hitfb_driver = {
.probe = hitfb_probe,
.remove = __devexit_p(hitfb_remove),
.remove = __exit_p(hitfb_remove),
#ifdef CONFIG_PM
.suspend = hitfb_suspend,
.resume = hitfb_resume,
......
/* drivers/video/pvr2fb.c
/*
* drivers/video/pvr2fb.c
*
* Frame buffer and fbcon support for the NEC PowerVR2 found within the Sega
* Dreamcast.
*
* Copyright (c) 2001 M. R. Brown <mrbrown@0xd6.org>
* Copyright (c) 2001, 2002, 2003, 2004, 2005 Paul Mundt <lethal@linux-sh.org>
*
* This file is part of the LinuxDC project (linuxdc.sourceforge.net).
* Copyright (c) 2001 - 2008 Paul Mundt <lethal@linux-sh.org>
*
*/
/*
* This driver is mostly based on the excellent amifb and vfb sources. It uses
* an odd scheme for converting hardware values to/from framebuffer values,
* here are some hacked-up formulas:
......@@ -490,7 +486,7 @@ static int pvr2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
} else {
var->sync &= ~FB_SYNC_BROADCAST;
var->vmode &= ~FB_VMODE_INTERLACED;
var->vmode |= pvr2_var.vmode;
var->vmode |= FB_VMODE_NONINTERLACED;
}
if ((var->activate & FB_ACTIVATE_MASK) != FB_ACTIVATE_TEST) {
......
......@@ -15,7 +15,6 @@ extern void __ndelay(unsigned long nsecs);
extern void __const_udelay(unsigned long xloops);
extern void __delay(unsigned long loops);
#ifdef CONFIG_SUPERH32
#define udelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
__udelay(n))
......@@ -23,9 +22,5 @@ extern void __delay(unsigned long loops);
#define ndelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
__ndelay(n))
#else
extern void udelay(unsigned long usecs);
extern void ndelay(unsigned long nsecs);
#endif
#endif /* __ASM_SH_DELAY_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment