2005-04-17 05:20:36 +07:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-footbridge/cats-hw.c
|
|
|
|
*
|
|
|
|
* CATS machine fixup
|
|
|
|
*
|
|
|
|
* Copyright (C) 1998, 1999 Russell King, Phil Blundell
|
|
|
|
*/
|
|
|
|
#include <linux/ioport.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
2006-07-14 22:23:33 +07:00
|
|
|
#include <linux/screen_info.h>
|
2008-09-06 18:10:45 +07:00
|
|
|
#include <linux/io.h>
|
2008-12-06 15:25:16 +07:00
|
|
|
#include <linux/spinlock.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
|
|
|
#include <asm/hardware/dec21285.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/setup.h>
|
|
|
|
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
#define CFG_PORT 0x370
|
|
|
|
#define INDEX_PORT (CFG_PORT)
|
|
|
|
#define DATA_PORT (CFG_PORT + 1)
|
|
|
|
|
|
|
|
static int __init cats_hw_init(void)
|
|
|
|
{
|
|
|
|
if (machine_is_cats()) {
|
|
|
|
/* Set Aladdin to CONFIGURE mode */
|
|
|
|
outb(0x51, CFG_PORT);
|
|
|
|
outb(0x23, CFG_PORT);
|
|
|
|
|
|
|
|
/* Select logical device 3 */
|
|
|
|
outb(0x07, INDEX_PORT);
|
|
|
|
outb(0x03, DATA_PORT);
|
|
|
|
|
|
|
|
/* Set parallel port to DMA channel 3, ECP+EPP1.9,
|
|
|
|
enable EPP timeout */
|
|
|
|
outb(0x74, INDEX_PORT);
|
|
|
|
outb(0x03, DATA_PORT);
|
|
|
|
|
|
|
|
outb(0xf0, INDEX_PORT);
|
|
|
|
outb(0x0f, DATA_PORT);
|
|
|
|
|
|
|
|
outb(0xf1, INDEX_PORT);
|
|
|
|
outb(0x07, DATA_PORT);
|
|
|
|
|
|
|
|
/* Select logical device 4 */
|
|
|
|
outb(0x07, INDEX_PORT);
|
|
|
|
outb(0x04, DATA_PORT);
|
|
|
|
|
|
|
|
/* UART1 high speed mode */
|
|
|
|
outb(0xf0, INDEX_PORT);
|
|
|
|
outb(0x02, DATA_PORT);
|
|
|
|
|
|
|
|
/* Select logical device 5 */
|
|
|
|
outb(0x07, INDEX_PORT);
|
|
|
|
outb(0x05, DATA_PORT);
|
|
|
|
|
|
|
|
/* UART2 high speed mode */
|
|
|
|
outb(0xf0, INDEX_PORT);
|
|
|
|
outb(0x02, DATA_PORT);
|
|
|
|
|
|
|
|
/* Set Aladdin to RUN mode */
|
|
|
|
outb(0xbb, CFG_PORT);
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
__initcall(cats_hw_init);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* CATS uses soft-reboot by default, since
|
|
|
|
* hard reboots fail on early boards.
|
|
|
|
*/
|
|
|
|
static void __init
|
ARM: platform fixups: remove mdesc argument to fixup function
Get rid of the mdesc pointer in the fixup function call. No one uses
the mdesc pointer, it shouldn't be modified anyway, and we can't wrap
it, so let's remove it.
Platform files found by:
$ regexp=$(git grep -h '\.fixup.*=' arch/arm |
sed 's!.*= *\([^,]*\),* *!\1!' | sort -u |
tr '\n' '|' | sed 's,|$,,;s,|,\\|,g')
$ git grep $regexp arch/arm
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-20 17:37:50 +07:00
|
|
|
fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)
|
2005-04-17 05:20:36 +07:00
|
|
|
{
|
2014-03-15 17:30:18 +07:00
|
|
|
#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
|
2007-10-17 12:36:04 +07:00
|
|
|
screen_info.orig_video_lines = 25;
|
|
|
|
screen_info.orig_video_points = 16;
|
|
|
|
screen_info.orig_y = 24;
|
2014-03-15 17:30:18 +07:00
|
|
|
#endif
|
2005-04-17 05:20:36 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
MACHINE_START(CATS, "Chalice-CATS")
|
2005-07-03 23:38:58 +07:00
|
|
|
/* Maintainer: Philip Blundell */
|
2011-07-06 09:38:11 +07:00
|
|
|
.atag_offset = 0x100,
|
2013-07-09 06:01:39 +07:00
|
|
|
.reboot_mode = REBOOT_SOFT,
|
2005-07-03 23:38:58 +07:00
|
|
|
.fixup = fixup_cats,
|
|
|
|
.map_io = footbridge_map_io,
|
|
|
|
.init_irq = footbridge_init_irq,
|
2012-11-09 02:40:59 +07:00
|
|
|
.init_time = isa_timer_init,
|
2011-11-04 02:47:54 +07:00
|
|
|
.restart = footbridge_restart,
|
2005-04-17 05:20:36 +07:00
|
|
|
MACHINE_END
|