Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327044
b: refs/heads/master
c: fd5812e
h: refs/heads/master
v: v3
  • Loading branch information
Olof Johansson committed Sep 16, 2012
1 parent ad08bb9 commit a20cdb2
Show file tree
Hide file tree
Showing 10 changed files with 431 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b22f6bb030ee0c98839fe2445571c57c9f89594e
refs/heads/master: fd5812e0a5816ff0dc665485bb3746e788cbd48e
14 changes: 14 additions & 0 deletions trunk/arch/arm/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,20 @@ choice
Say Y here if you want kernel low-level debugging support
on i.MX6Q UART4.

config DEBUG_MMP_UART2
bool "Kernel low-level debugging message via MMP UART2"
depends on ARCH_MMP
help
Say Y here if you want kernel low-level debugging support
on MMP UART2.

config DEBUG_MMP_UART3
bool "Kernel low-level debugging message via MMP UART3"
depends on ARCH_MMP
help
Say Y here if you want kernel low-level debugging support
on MMP UART3.

config DEBUG_MSM_UART1
bool "Kernel low-level debugging messages via MSM UART1"
depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/arm/configs/mmp2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS2,38400 mem=128M user_debug=255"
CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfsroot/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS2,38400 mem=128M user_debug=255 earlyprintk"
CONFIG_VFP=y
CONFIG_NET=y
CONFIG_PACKET=y
Expand Down Expand Up @@ -90,6 +90,9 @@ CONFIG_DEBUG_INFO=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_DYNAMIC_DEBUG is not set
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_MMP_UART3=y
CONFIG_EARLY_PRINTK=y
CONFIG_DEBUG_ERRORS=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRC_CCITT=y
4 changes: 3 additions & 1 deletion trunk/arch/arm/configs/pxa910_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.2.100:/nfsroot/ ip=192.168.2.101:192.168.2.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=128M"
CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.2.100:/nfsroot/ ip=192.168.2.101:192.168.2.100::255.255.255.0::eth0:on console=ttyS0,115200 mem=128M earlyprintk"
CONFIG_FPE_NWFPE=y
CONFIG_NET=y
CONFIG_PACKET=y
Expand Down Expand Up @@ -66,5 +66,7 @@ CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_MMP_UART2=y
CONFIG_EARLY_PRINTK=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRC_CCITT=y
61 changes: 61 additions & 0 deletions trunk/arch/arm/mach-ks8695/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,67 @@ config MACH_ACS5K
say 'Y' here if you want your kernel to run on the Brivo
Systems LLC, ACS-5000 Master board.

config MACH_LITE300
bool "SecureComputing SG300"
help
Say 'Y' here if you want your kernel to support the
SecureComputing / SnapGear SG300 VPN Internet Router.
See http://www.securecomputing.com for more details.

config MACH_SG310
bool "McAfee SG310"
help
Say 'Y' here if you want your kernel to support the
McAfee / SnapGear SG310 VPN Internet Router.
See http://www.mcafee.com for more details.

config MACH_SE4200
bool "SecureComputing SE4200"
help
Say 'Y' here if you want your kernel to support the
SecureComputing / SnapGear SE4200 Secure Wireless VPN
Internet Router.
See http://www.securecomputing.com for more details.

config MACH_CM4002
bool "OpenGear CM4002"
help
Say 'Y' here if you want your kernel to support the OpenGear
CM4002 Secure Access Server. See http://www.opengear.com for
more details.

config MACH_CM4008
bool "OpenGear CM4008"
select MIGHT_HAVE_PCI
help
Say 'Y' here if you want your kernel to support the OpenGear
CM4008 Console Server. See http://www.opengear.com for more
details.

config MACH_CM41xx
bool "OpenGear CM41xx"
select MIGHT_HAVE_PCI
help
Say 'Y' here if you want your kernel to support the OpenGear
CM4016 or CM4048 Console Servers. See http://www.opengear.com for
more details.

config MACH_IM4004
bool "OpenGear IM4004"
select MIGHT_HAVE_PCI
help
Say 'Y' here if you want your kernel to support the OpenGear
IM4004 Secure Access Server. See http://www.opengear.com for
more details.

config MACH_IM42xx
bool "OpenGear IM42xx"
select MIGHT_HAVE_PCI
help
Say 'Y' here if you want your kernel to support the OpenGear
IM4216 or IM4248 Console Servers. See http://www.opengear.com for
more details.

endmenu

endif
8 changes: 8 additions & 0 deletions trunk/arch/arm/mach-ks8695/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ obj-$(CONFIG_LEDS) += leds.o
obj-$(CONFIG_MACH_KS8695) += board-micrel.o
obj-$(CONFIG_MACH_DSM320) += board-dsm320.o
obj-$(CONFIG_MACH_ACS5K) += board-acs5k.o
obj-$(CONFIG_MACH_LITE300) += board-sg.o
obj-$(CONFIG_MACH_SG310) += board-sg.o
obj-$(CONFIG_MACH_SE4200) += board-sg.o
obj-$(CONFIG_MACH_CM4002) += board-og.o
obj-$(CONFIG_MACH_CM4008) += board-og.o
obj-$(CONFIG_MACH_CM41xx) += board-og.o
obj-$(CONFIG_MACH_IM4004) += board-og.o
obj-$(CONFIG_MACH_IM42xx) += board-og.o
199 changes: 199 additions & 0 deletions trunk/arch/arm/mach-ks8695/board-og.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
/*
* board-og.c -- support for the OpenGear KS8695 based boards.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/serial_8250.h>
#include <linux/gpio.h>
#include <linux/irq.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <mach/devices.h>
#include <mach/regs-gpio.h>
#include <mach/gpio-ks8695.h>
#include "generic.h"

static int og_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
if (machine_is_im4004() && (slot == 8))
return KS8695_IRQ_EXTERN1;
return KS8695_IRQ_EXTERN0;
}

static struct ks8695_pci_cfg __initdata og_pci = {
.mode = KS8695_MODE_PCI,
.map_irq = og_pci_map_irq,
};

static void __init og_register_pci(void)
{
/* Initialize the GPIO lines for interrupt mode */
ks8695_gpio_interrupt(KS8695_GPIO_0, IRQ_TYPE_LEVEL_LOW);

/* Cardbus Slot */
if (machine_is_im4004())
ks8695_gpio_interrupt(KS8695_GPIO_1, IRQ_TYPE_LEVEL_LOW);

ks8695_init_pci(&og_pci);
}

/*
* The PCI bus reset is driven by a dedicated GPIO line. Toggle it here
* and bring the PCI bus out of reset.
*/
static void __init og_pci_bus_reset(void)
{
unsigned int rstline = 1;

/* Some boards use a different GPIO as the PCI reset line */
if (machine_is_im4004())
rstline = 2;
else if (machine_is_im42xx())
rstline = 0;

gpio_request(rstline, "PCI reset");
gpio_direction_output(rstline, 0);

/* Drive a reset on the PCI reset line */
gpio_set_value(rstline, 1);
gpio_set_value(rstline, 0);
mdelay(100);
gpio_set_value(rstline, 1);
mdelay(100);
}

/*
* Direct connect serial ports (non-PCI that is).
*/
#define S8250_PHYS 0x03800000
#define S8250_VIRT 0xf4000000
#define S8250_SIZE 0x00100000

static struct __initdata map_desc og_io_desc[] = {
{
.virtual = S8250_VIRT,
.pfn = __phys_to_pfn(S8250_PHYS),
.length = S8250_SIZE,
.type = MT_DEVICE,
}
};

static struct resource og_uart_resources[] = {
{
.start = S8250_VIRT,
.end = S8250_VIRT + S8250_SIZE,
.flags = IORESOURCE_MEM
},
};

static struct plat_serial8250_port og_uart_data[] = {
{
.mapbase = S8250_VIRT,
.membase = (char *) S8250_VIRT,
.irq = 3,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = 115200 * 16,
},
{ },
};

static struct platform_device og_uart = {
.name = "serial8250",
.id = 0,
.dev.platform_data = og_uart_data,
.num_resources = 1,
.resource = og_uart_resources
};

static struct platform_device *og_devices[] __initdata = {
&og_uart
};

static void __init og_init(void)
{
ks8695_register_gpios();

if (machine_is_cm4002()) {
ks8695_gpio_interrupt(KS8695_GPIO_1, IRQ_TYPE_LEVEL_HIGH);
iotable_init(og_io_desc, ARRAY_SIZE(og_io_desc));
platform_add_devices(og_devices, ARRAY_SIZE(og_devices));
} else {
og_pci_bus_reset();
og_register_pci();
}

ks8695_add_device_lan();
ks8695_add_device_wan();
}

#ifdef CONFIG_MACH_CM4002
MACHINE_START(CM4002, "OpenGear/CM4002")
/* OpenGear Inc. */
.atag_offset = 0x100,
.map_io = ks8695_map_io,
.init_irq = ks8695_init_irq,
.init_machine = og_init,
.timer = &ks8695_timer,
.restart = ks8695_restart,
MACHINE_END
#endif

#ifdef CONFIG_MACH_CM4008
MACHINE_START(CM4008, "OpenGear/CM4008")
/* OpenGear Inc. */
.atag_offset = 0x100,
.map_io = ks8695_map_io,
.init_irq = ks8695_init_irq,
.init_machine = og_init,
.timer = &ks8695_timer,
.restart = ks8695_restart,
MACHINE_END
#endif

#ifdef CONFIG_MACH_CM41xx
MACHINE_START(CM41XX, "OpenGear/CM41xx")
/* OpenGear Inc. */
.atag_offset = 0x100,
.map_io = ks8695_map_io,
.init_irq = ks8695_init_irq,
.init_machine = og_init,
.timer = &ks8695_timer,
.restart = ks8695_restart,
MACHINE_END
#endif

#ifdef CONFIG_MACH_IM4004
MACHINE_START(IM4004, "OpenGear/IM4004")
/* OpenGear Inc. */
.atag_offset = 0x100,
.map_io = ks8695_map_io,
.init_irq = ks8695_init_irq,
.init_machine = og_init,
.timer = &ks8695_timer,
.restart = ks8695_restart,
MACHINE_END
#endif

#ifdef CONFIG_MACH_IM42xx
MACHINE_START(IM42XX, "OpenGear/IM42xx")
/* OpenGear Inc. */
.atag_offset = 0x100,
.map_io = ks8695_map_io,
.init_irq = ks8695_init_irq,
.init_machine = og_init,
.timer = &ks8695_timer,
.restart = ks8695_restart,
MACHINE_END
#endif
Loading

0 comments on commit a20cdb2

Please sign in to comment.