185749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin/*
26f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin * Copyright (C) 2009 Lemote, Inc.
3f7a904dffe30a02636053d8022498ced7e44d31cWu Zhangjin * Author: Wu Zhangjin <wuzhangjin@gmail.com>
485749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin *
585749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin * This program is free software; you can redistribute  it and/or modify it
685749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin * under  the terms of  the GNU General  Public License as published by the
785749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin * Free Software Foundation;  either version 2 of the  License, or (at your
885749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin * option) any later version.
985749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin */
1085749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin
1185749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin#ifndef __ASM_MACH_LOONGSON_MEM_H
1285749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin#define __ASM_MACH_LOONGSON_MEM_H
1385749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin
1485749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin/*
156f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin * high memory space
1685749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin *
176f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin * in loongson2e, starts from 512M
186f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin * in loongson2f, starts from 2G 256M
1985749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin */
206f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin#ifdef CONFIG_CPU_LOONGSON2E
216f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin#define LOONGSON_HIGHMEM_START	0x20000000
226f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin#else
236f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin#define LOONGSON_HIGHMEM_START	0x90000000
246f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin#endif
2585749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin
266f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin/*
276f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin * the peripheral registers(MMIO):
286f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin *
296f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin * On the Lemote Loongson 2e system, reside between 0x1000:0000 and 0x2000:0000.
306f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin * On the Lemote Loongson 2f system, reside between 0x1000:0000 and 0x8000:0000.
316f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin */
3285749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin
3385749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin#define LOONGSON_MMIO_MEM_START 0x10000000
3485749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin
356f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin#ifdef CONFIG_CPU_LOONGSON2E
366f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin#define LOONGSON_MMIO_MEM_END	0x20000000
376f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin#else
386f7a251a259e5bf58a9ff334bdcfa3e42b6cb7a3Wu Zhangjin#define LOONGSON_MMIO_MEM_END	0x80000000
3985749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin#endif
4085749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin
4185749d24bcf90440b10394312e5b1c96d1a62cdbWu Zhangjin#endif /* __ASM_MACH_LOONGSON_MEM_H */
42