Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * PQ2ADS platform support |
| 3 | * |
Kumar Gala | 4c8d3d9 | 2005-11-13 16:06:30 -0800 | [diff] [blame] | 4 | * Author: Kumar Gala <galak@kernel.crashing.org> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | * Derived from: est8260_setup.c by Allen Curtis |
| 6 | * |
| 7 | * Copyright 2004 Freescale Semiconductor, Inc. |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * option) any later version. |
| 13 | */ |
| 14 | |
| 15 | #include <linux/init.h> |
| 16 | |
Vitaly Bordug | 4427d6b | 2006-04-25 20:26:43 +0400 | [diff] [blame] | 17 | #include <asm/io.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #include <asm/mpc8260.h> |
Vitaly Bordug | 4427d6b | 2006-04-25 20:26:43 +0400 | [diff] [blame] | 19 | #include <asm/cpm2.h> |
| 20 | #include <asm/immap_cpm2.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | |
| 22 | void __init |
| 23 | m82xx_board_setup(void) |
| 24 | { |
Vitaly Bordug | 4427d6b | 2006-04-25 20:26:43 +0400 | [diff] [blame] | 25 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); |
| 26 | u32 *bcsr = ioremap(BCSR_ADDR+4, sizeof(u32)); |
| 27 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | /* Enable the 2nd UART port */ |
Vitaly Bordug | 4427d6b | 2006-04-25 20:26:43 +0400 | [diff] [blame] | 29 | clrbits32(bcsr, BCSR1_RS232_EN2); |
| 30 | |
| 31 | #ifdef CONFIG_SERIAL_CPM_SCC1 |
| 32 | clrbits32((u32*)&immap->im_scc[0].scc_sccm, UART_SCCM_TX | UART_SCCM_RX); |
| 33 | clrbits32((u32*)&immap->im_scc[0].scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); |
| 34 | #endif |
| 35 | |
| 36 | #ifdef CONFIG_SERIAL_CPM_SCC2 |
| 37 | clrbits32((u32*)&immap->im_scc[1].scc_sccm, UART_SCCM_TX | UART_SCCM_RX); |
| 38 | clrbits32((u32*)&immap->im_scc[1].scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); |
| 39 | #endif |
| 40 | |
| 41 | #ifdef CONFIG_SERIAL_CPM_SCC3 |
| 42 | clrbits32((u32*)&immap->im_scc[2].scc_sccm, UART_SCCM_TX | UART_SCCM_RX); |
| 43 | clrbits32((u32*)&immap->im_scc[2].scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); |
| 44 | #endif |
| 45 | |
| 46 | #ifdef CONFIG_SERIAL_CPM_SCC4 |
| 47 | clrbits32((u32*)&immap->im_scc[3].scc_sccm, UART_SCCM_TX | UART_SCCM_RX); |
| 48 | clrbits32((u32*)&immap->im_scc[3].scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); |
| 49 | #endif |
| 50 | |
| 51 | iounmap(bcsr); |
| 52 | iounmap(immap); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | } |