1/* 2 * arch/sh/stboard/setup.c 3 * 4 * Copyright (C) 2001 Stuart Menefy (stuart.menefy@st.com) 5 * 6 * May be copied or modified under the terms of the GNU General Public 7 * License. See linux/COPYING for more information. 8 * 9 * STMicroelectronics ST40STB1 HARP and compatible support. 10 */ 11 12#include <linux/config.h> 13#include <linux/kernel.h> 14#include <linux/init.h> 15#include <asm/io.h> 16#include "harp.h" 17/* 18 * Initialize the board 19 */ 20int __init setup_harp(void) 21{ 22#ifdef CONFIG_SH_STB1_HARP 23 unsigned long ic8_version, ic36_version; 24 25 ic8_version = ctrl_inl(EPLD_REVID2); 26 ic36_version = ctrl_inl(EPLD_REVID1); 27 28 printk("STMicroelectronics STB1 HARP initialisaton\n"); 29 printk("EPLD versions: IC8: %d.%02d, IC36: %d.%02d\n", 30 (ic8_version >> 4) & 0xf, ic8_version & 0xf, 31 (ic36_version >> 4) & 0xf, ic36_version & 0xf); 32#elif defined(CONFIG_SH_STB1_OVERDRIVE) 33 unsigned long version; 34 35 version = ctrl_inl(EPLD_REVID); 36 37 printk("STMicroelectronics STB1 Overdrive initialisaton\n"); 38 printk("EPLD version: %d.%02d\n", 39 (version >> 4) & 0xf, version & 0xf); 40#else 41#error Undefined machine 42#endif 43 44 /* Currently all STB1 chips have problems with the sleep instruction, 45 * so disable it here. 46 */ 47 disable_hlt(); 48 49 return 0; 50} 51