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

Commit ce4796d1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 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
Loading
Loading
Loading
Loading
+0 −7
Original line number Original line Diff line number Diff line
@@ -456,13 +456,6 @@ config SH_SECUREEDGE5410
	  This includes both the OEM SecureEdge products as well as the
	  This includes both the OEM SecureEdge products as well as the
	  SME product line.
	  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
config SH_RTS7751R2D
	bool "RTS7751R2D"
	bool "RTS7751R2D"
	depends on CPU_SUBTYPE_SH7751R
	depends on CPU_SUBTYPE_SH7751R
+0 −1
Original line number Original line Diff line number Diff line
@@ -118,7 +118,6 @@ machdir-$(CONFIG_SH_EDOSK7705) += renesas/edosk7705
machdir-$(CONFIG_SH_HIGHLANDER)			+= renesas/r7780rp
machdir-$(CONFIG_SH_HIGHLANDER)			+= renesas/r7780rp
machdir-$(CONFIG_SH_MIGOR)			+= renesas/migor
machdir-$(CONFIG_SH_MIGOR)			+= renesas/migor
machdir-$(CONFIG_SH_SDK7780)			+= renesas/sdk7780
machdir-$(CONFIG_SH_SDK7780)			+= renesas/sdk7780
machdir-$(CONFIG_SH_7710VOIPGW)			+= renesas/sh7710voipgw
machdir-$(CONFIG_SH_X3PROTO)			+= renesas/x3proto
machdir-$(CONFIG_SH_X3PROTO)			+= renesas/x3proto
machdir-$(CONFIG_SH_SH4202_MICRODEV)		+= superh/microdev
machdir-$(CONFIG_SH_SH4202_MICRODEV)		+= superh/microdev
machdir-$(CONFIG_SH_LANDISK)			+= landisk
machdir-$(CONFIG_SH_LANDISK)			+= landisk
+16 −6
Original line number Original line Diff line number Diff line
@@ -2,6 +2,7 @@
 * bios-less APM driver for hp680
 * bios-less APM driver for hp680
 *
 *
 * Copyright 2005 (c) Andriy Skulysh <askulysh@gmail.com>
 * 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
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License.
 * modify it under the terms of the GNU General Public License.
@@ -15,17 +16,19 @@
#include <asm/adc.h>
#include <asm/adc.h>
#include <asm/hp6xx.h>
#include <asm/hp6xx.h>


#define SH7709_PGDR			0xa400012c
/* percentage values */

#define APM_CRITICAL			10
#define APM_CRITICAL			10
#define APM_LOW				30
#define APM_LOW				30


/* resonably sane values */
#define HP680_BATTERY_MAX		898
#define HP680_BATTERY_MAX		898
#define HP680_BATTERY_MIN		486
#define HP680_BATTERY_MIN		486
#define HP680_BATTERY_AC_ON		1023
#define HP680_BATTERY_AC_ON		1023


#define MODNAME "hp6x0_apm"
#define MODNAME "hp6x0_apm"


#define PGDR	0xa400012c

static void hp6x0_apm_get_power_status(struct apm_power_info *info)
static void hp6x0_apm_get_power_status(struct apm_power_info *info)
{
{
	int battery, backup, charging, percentage;
	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) /
	percentage = 100 * (battery - HP680_BATTERY_MIN) /
			   (HP680_BATTERY_MAX - 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) ?
	info->ac_line_status = (battery > HP680_BATTERY_AC_ON) ?
			 APM_AC_ONLINE : APM_AC_OFFLINE;
			 APM_AC_ONLINE : APM_AC_OFFLINE;


	pgdr = ctrl_inb(SH7709_PGDR);
	pgdr = ctrl_inb(PGDR);
	if (pgdr & PGDR_MAIN_BATTERY_OUT) {
	if (pgdr & PGDR_MAIN_BATTERY_OUT) {
		info->battery_status	= APM_BATTERY_STATUS_NOT_PRESENT;
		info->battery_status	= APM_BATTERY_STATUS_NOT_PRESENT;
		info->battery_flag	= 0x80;
		info->battery_flag	= 0x80;
	} else if (charging < 8) {
	} else if (charging < 8) {
		info->battery_status	= APM_BATTERY_STATUS_CHARGING;
		info->battery_status	= APM_BATTERY_STATUS_CHARGING;
		info->battery_flag	= 0x08;
		info->battery_flag	= 0x08;
		info->ac_line_status = 0xff;
		info->ac_line_status	= 0x01;
	} else if (percentage <= APM_CRITICAL) {
	} else if (percentage <= APM_CRITICAL) {
		info->battery_status	= APM_BATTERY_STATUS_CRITICAL;
		info->battery_status	= APM_BATTERY_STATUS_CRITICAL;
		info->battery_flag	= 0x04;
		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_status	= APM_BATTERY_STATUS_HIGH;
		info->battery_flag	= 0x01;
		info->battery_flag	= 0x01;
	}
	}

	info->units = 0;
}
}


static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
+0 −1
Original line number Original line Diff line number Diff line
obj-y	 := setup.o
+0 −94
Original line number Original line Diff line number Diff line
/*
 * 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,
};
Loading