Path: blob/master/arch/arm/mach-footbridge/cats-hw.c
10817 views
/*1* linux/arch/arm/mach-footbridge/cats-hw.c2*3* CATS machine fixup4*5* Copyright (C) 1998, 1999 Russell King, Phil Blundell6*/7#include <linux/ioport.h>8#include <linux/kernel.h>9#include <linux/init.h>10#include <linux/screen_info.h>11#include <linux/io.h>12#include <linux/spinlock.h>1314#include <asm/hardware/dec21285.h>15#include <asm/mach-types.h>16#include <asm/setup.h>1718#include <asm/mach/arch.h>1920#include "common.h"2122#define CFG_PORT 0x37023#define INDEX_PORT (CFG_PORT)24#define DATA_PORT (CFG_PORT + 1)2526static int __init cats_hw_init(void)27{28if (machine_is_cats()) {29/* Set Aladdin to CONFIGURE mode */30outb(0x51, CFG_PORT);31outb(0x23, CFG_PORT);3233/* Select logical device 3 */34outb(0x07, INDEX_PORT);35outb(0x03, DATA_PORT);3637/* Set parallel port to DMA channel 3, ECP+EPP1.9,38enable EPP timeout */39outb(0x74, INDEX_PORT);40outb(0x03, DATA_PORT);4142outb(0xf0, INDEX_PORT);43outb(0x0f, DATA_PORT);4445outb(0xf1, INDEX_PORT);46outb(0x07, DATA_PORT);4748/* Select logical device 4 */49outb(0x07, INDEX_PORT);50outb(0x04, DATA_PORT);5152/* UART1 high speed mode */53outb(0xf0, INDEX_PORT);54outb(0x02, DATA_PORT);5556/* Select logical device 5 */57outb(0x07, INDEX_PORT);58outb(0x05, DATA_PORT);5960/* UART2 high speed mode */61outb(0xf0, INDEX_PORT);62outb(0x02, DATA_PORT);6364/* Set Aladdin to RUN mode */65outb(0xbb, CFG_PORT);66}6768return 0;69}7071__initcall(cats_hw_init);7273/*74* CATS uses soft-reboot by default, since75* hard reboots fail on early boards.76*/77static void __init78fixup_cats(struct machine_desc *desc, struct tag *tags,79char **cmdline, struct meminfo *mi)80{81screen_info.orig_video_lines = 25;82screen_info.orig_video_points = 16;83screen_info.orig_y = 24;84}8586MACHINE_START(CATS, "Chalice-CATS")87/* Maintainer: Philip Blundell */88.boot_params = 0x00000100,89.soft_reboot = 1,90.fixup = fixup_cats,91.map_io = footbridge_map_io,92.init_irq = footbridge_init_irq,93.timer = &isa_timer,94MACHINE_END959697