Deleted Added
full compact
cambria_exp_space.c (194753) cambria_exp_space.c (236987)
1/*-
2 * Copyright (c) 2009 Sam Leffler. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 22 unchanged lines hidden (view full) ---

31 * chip select changes; this doesn't seem necessary (as required
32 * for IXP425/Avila boards).
33 *
34 * XXX should make this generic so all expansion bus devices can
35 * use it but probably not until we eliminate the ATA hacks
36 */
37
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009 Sam Leffler. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 22 unchanged lines hidden (view full) ---

31 * chip select changes; this doesn't seem necessary (as required
32 * for IXP425/Avila boards).
33 *
34 * XXX should make this generic so all expansion bus devices can
35 * use it but probably not until we eliminate the ATA hacks
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/cambria_exp_space.c 194753 2009-06-23 19:29:23Z sam $");
39__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/cambria_exp_space.c 236987 2012-06-13 04:38:09Z imp $");
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/lock.h>
44#include <sys/mutex.h>
45#include <sys/bus.h>
46#include <sys/endian.h>
47

--- 196 unchanged lines hidden (view full) ---

244 c3.sc = sc;
245 c3.csoff = EXP_TIMING_CS3_OFFSET;
246 EXP_LOCK_INIT(&c3);
247 cambria_exp_bs_tag.bs_cookie = &c3;
248
249 cs3 = EXP_BUS_READ_4(sc, EXP_TIMING_CS3_OFFSET);
250 /* XXX force slowest possible timings and byte mode */
251 EXP_BUS_WRITE_4(sc, EXP_TIMING_CS3_OFFSET,
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/lock.h>
44#include <sys/mutex.h>
45#include <sys/bus.h>
46#include <sys/endian.h>
47

--- 196 unchanged lines hidden (view full) ---

244 c3.sc = sc;
245 c3.csoff = EXP_TIMING_CS3_OFFSET;
246 EXP_LOCK_INIT(&c3);
247 cambria_exp_bs_tag.bs_cookie = &c3;
248
249 cs3 = EXP_BUS_READ_4(sc, EXP_TIMING_CS3_OFFSET);
250 /* XXX force slowest possible timings and byte mode */
251 EXP_BUS_WRITE_4(sc, EXP_TIMING_CS3_OFFSET,
252 cs3 | (EXP_T1|EXP_T2|EXP_T3|EXP_T4|EXP_T5) |
252 cs3 | (EXP_T1|EXP_T2|EXP_T3|EXP_T4|EXP_T5) |
253 EXP_BYTE_EN | EXP_WR_EN | EXP_BYTE_RD16 | EXP_CS_EN);
254
255 /* XXX force GPIO 3+4 for GPS+RS485 uarts */
256 ixp425_set_gpio(sc, 3, GPIO_TYPE_EDG_RISING);
257 ixp425_set_gpio(sc, 4, GPIO_TYPE_EDG_RISING);
258}
253 EXP_BYTE_EN | EXP_WR_EN | EXP_BYTE_RD16 | EXP_CS_EN);
254
255 /* XXX force GPIO 3+4 for GPS+RS485 uarts */
256 ixp425_set_gpio(sc, 3, GPIO_TYPE_EDG_RISING);
257 ixp425_set_gpio(sc, 4, GPIO_TYPE_EDG_RISING);
258}