| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.10 2009/12/03 22:36:56 cliff Exp $ */ | | 1 | /* $NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.11 2009/12/04 01:12:17 cliff Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, |
9 | * NASA Ames Research Center. | | 9 | * NASA Ames Research Center. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -71,27 +71,27 @@ | | | @@ -71,27 +71,27 @@ |
71 | * declared. | | 71 | * declared. |
72 | * CHIP_EX_STORE_SIZE | | 72 | * CHIP_EX_STORE_SIZE |
73 | * Size of the device-provided static storage area | | 73 | * Size of the device-provided static storage area |
74 | * for the memory or I/O memory space extent. | | 74 | * for the memory or I/O memory space extent. |
75 | * CHIP_LITTLE_ENDIAN | CHIP_BIG_ENDIAN | | 75 | * CHIP_LITTLE_ENDIAN | CHIP_BIG_ENDIAN |
76 | * For endian-specific busses, like PCI (little). | | 76 | * For endian-specific busses, like PCI (little). |
77 | * CHIP_ACCESS_SIZE | | 77 | * CHIP_ACCESS_SIZE |
78 | * Size (in bytes) of minimum bus access, e.g. 4 | | 78 | * Size (in bytes) of minimum bus access, e.g. 4 |
79 | * to indicate all bus cycles are 32-bits. Defaults | | 79 | * to indicate all bus cycles are 32-bits. Defaults |
80 | * to 1, indicating any access size is valid. | | 80 | * to 1, indicating any access size is valid. |
81 | */ | | 81 | */ |
82 | | | 82 | |
83 | #include <sys/cdefs.h> | | 83 | #include <sys/cdefs.h> |
84 | __KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.10 2009/12/03 22:36:56 cliff Exp $"); | | 84 | __KERNEL_RCSID(0, "$NetBSD: bus_space_alignstride_chipdep.c,v 1.10.18.11 2009/12/04 01:12:17 cliff Exp $"); |
85 | | | 85 | |
86 | #ifdef CHIP_EXTENT | | 86 | #ifdef CHIP_EXTENT |
87 | #include <sys/extent.h> | | 87 | #include <sys/extent.h> |
88 | #endif | | 88 | #endif |
89 | #include <sys/malloc.h> | | 89 | #include <sys/malloc.h> |
90 | | | 90 | |
91 | #include <machine/locore.h> | | 91 | #include <machine/locore.h> |
92 | | | 92 | |
93 | #include <uvm/uvm_extern.h> | | 93 | #include <uvm/uvm_extern.h> |
94 | | | 94 | |
95 | #define __C(A,B) __CONCAT(A,B) | | 95 | #define __C(A,B) __CONCAT(A,B) |
96 | #define __S(S) __STRING(S) | | 96 | #define __S(S) __STRING(S) |
97 | | | 97 | |
| @@ -542,29 +542,29 @@ __BS(init)(bus_space_tag_t t, void *v) | | | @@ -542,29 +542,29 @@ __BS(init)(bus_space_tag_t t, void *v) |
542 | t->bs_wms_2 = __BS(write_multi_2); | | 542 | t->bs_wms_2 = __BS(write_multi_2); |
543 | t->bs_wms_4 = __BS(write_multi_4); | | 543 | t->bs_wms_4 = __BS(write_multi_4); |
544 | t->bs_wms_8 = __BS(write_multi_8); | | 544 | t->bs_wms_8 = __BS(write_multi_8); |
545 | | | 545 | |
546 | /* write region, stream */ | | 546 | /* write region, stream */ |
547 | t->bs_wrs_1 = __BS(write_region_1); | | 547 | t->bs_wrs_1 = __BS(write_region_1); |
548 | t->bs_wrs_2 = __BS(write_region_2); | | 548 | t->bs_wrs_2 = __BS(write_region_2); |
549 | t->bs_wrs_4 = __BS(write_region_4); | | 549 | t->bs_wrs_4 = __BS(write_region_4); |
550 | t->bs_wrs_8 = __BS(write_region_8); | | 550 | t->bs_wrs_8 = __BS(write_region_8); |
551 | #endif /* CHIP_NEED_STREAM */ | | 551 | #endif /* CHIP_NEED_STREAM */ |
552 | | | 552 | |
553 | #ifdef CHIP_EXTENT | | 553 | #ifdef CHIP_EXTENT |
554 | /* XXX WE WANT EXTENT_NOCOALESCE, BUT WE CAN'T USE IT. XXX */ | | 554 | /* XXX WE WANT EXTENT_NOCOALESCE, BUT WE CAN'T USE IT. XXX */ |
555 | ex = extent_create(__S(__BS(bus)), 0x0UL, 0xffffffffUL, M_DEVBUF, | | 555 | ex = extent_create(__S(__BS(bus)), 0x0UL, ~0UL, M_DEVBUF, |
556 | (void *)CHIP_EX_STORE(v), CHIP_EX_STORE_SIZE(v), EX_NOWAIT); | | 556 | (void *)CHIP_EX_STORE(v), CHIP_EX_STORE_SIZE(v), EX_NOWAIT); |
557 | extent_alloc_region(ex, 0, 0xffffffffUL, EX_NOWAIT); | | 557 | extent_alloc_region(ex, 0, ~0UL, EX_NOWAIT); |
558 | | | 558 | |
559 | #ifdef CHIP_W1_BUS_START | | 559 | #ifdef CHIP_W1_BUS_START |
560 | /* | | 560 | /* |
561 | * The window may be disabled. We notice this by seeing | | 561 | * The window may be disabled. We notice this by seeing |
562 | * -1 as the bus base address. | | 562 | * -1 as the bus base address. |
563 | */ | | 563 | */ |
564 | if (CHIP_W1_BUS_START(v) == (bus_addr_t) -1) { | | 564 | if (CHIP_W1_BUS_START(v) == (bus_addr_t) -1) { |
565 | #ifdef EXTENT_DEBUG | | 565 | #ifdef EXTENT_DEBUG |
566 | printf("%s: this space is disabled\n", __S(__BS(init))); | | 566 | printf("%s: this space is disabled\n", __S(__BS(init))); |
567 | #endif | | 567 | #endif |
568 | return; | | 568 | return; |
569 | } | | 569 | } |
570 | | | 570 | |