blob: 33f03027c193840a47c52023a5a30e569230d90a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * arch/sh/cchips/voyagergx/setup.c
3 *
4 * Setup routines for VoyagerGX cchip.
5 *
6 * Copyright (C) 2003 Lineo uSolutions, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13#include <linux/init.h>
14#include <linux/module.h>
15#include <asm/io.h>
Paul Mundtadf18902006-09-27 17:17:27 +090016#include <asm/voyagergx.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
18static int __init setup_voyagergx(void)
19{
20 unsigned long val;
21
Paul Mundt9c575482007-02-15 18:20:52 +090022 val = readl((void __iomem *)DRAM_CTRL);
Linus Torvalds1da177e2005-04-16 15:20:36 -070023 val |= (DRAM_CTRL_CPU_COLUMN_SIZE_256 |
24 DRAM_CTRL_CPU_ACTIVE_PRECHARGE |
25 DRAM_CTRL_CPU_RESET |
26 DRAM_CTRL_REFRESH_COMMAND |
27 DRAM_CTRL_BLOCK_WRITE_TIME |
28 DRAM_CTRL_BLOCK_WRITE_PRECHARGE |
29 DRAM_CTRL_ACTIVE_PRECHARGE |
30 DRAM_CTRL_RESET |
31 DRAM_CTRL_REMAIN_ACTIVE);
Paul Mundt9c575482007-02-15 18:20:52 +090032 writel(val, (void __iomem *)DRAM_CTRL);
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
34 return 0;
35}
36
37module_init(setup_voyagergx);