summaryrefslogtreecommitdiffstats
path: root/kernel/arch/arm/mach-iop33x/iq80331.c
blob: e2cb65cfbe23ec659f89efb780c36fc140b932b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
 * arch/arm/mach-iop33x/iq80331.c
 *
 * Board support code for the Intel IQ80331 platform.
 *
 * Author: Dave Jiang <dave.jiang@intel.com>
 * Copyright (C) 2003 Intel Corp.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 */

#include <linux/mm.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/string.h>
#include <linux/serial_core.h>
#include <linux/serial_8250.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/pci.h>
#include <asm/mach/time.h>
#include <asm/mach-types.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <mach/time.h>

/*
 * IQ80331 timer tick configuration.
 */
static void __init iq80331_timer_init(void)
{
	/* D-Step parts run at a higher internal bus frequency */
	if (*IOP3XX_ATURID >= 0xa)
		iop_init_time(333000000);
	else
		iop_init_time(266000000);
}


/*
 * IQ80331 PCI.
 */
static int __init
iq80331_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
	int irq;

	if (slot == 1 && pin == 1) {
		/* PCI-X Slot INTA */
		irq = IRQ_IOP33X_XINT1;
	} else if (slot == 1 && pin == 2) {
		/* PCI-X Slot INTB */
		irq = IRQ_IOP33X_XINT2;
	} else if (slot == 1 && pin == 3) {
		/* PCI-X Slot INTC */
		irq = IRQ_IOP33X_XINT3;
	} else if (slot == 1 && pin == 4) {
		/* PCI-X Slot INTD */
		irq = IRQ_IOP33X_XINT0;
	} else if (slot == 2) {
		/* GigE */
		irq = IRQ_IOP33X_XINT2;
	} else {
		printk(KERN_ERR "iq80331_pci_map_irq() called for unknown "
			"device PCI:%d:%d:%d\n", dev->bus->number,
			PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
		irq = -1;
	}

	return irq;
}

static struct hw_pci iq80331_pci __initdata = {
	.nr_controllers = 1,
	.ops		= &iop3xx_ops,
	.setup		= iop3xx_pci_setup,
	.preinit	= iop3xx_pci_preinit_cond,
	.map_irq	= iq80331_pci_map_irq,
};

static int __init iq80331_pci_init(void)
{
	if ((iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) &&
		machine_is_iq80331())
		pci_common_init(&iq80331_pci);

	return 0;
}

subsys_initcall(iq80331_pci_init);


/*
 * IQ80331 machine initialisation.
 */
static struct physmap_flash_data iq80331_flash_data = {
	.width		= 1,
};

static struct resource iq80331_flash_resource = {
	.start		= 0xc0000000,
	.end		= 0xc07fffff,
	.flags		= IORESOURCE_MEM,
};

static struct platform_device iq80331_flash_device = {
	.name		= "physmap-flash",
	.id		= 0,
	.dev		= {
		.platform_data	= &iq80331_flash_data,
	},
	.num_resources	= 1,
	.resource	= &iq80331_flash_resource,
};

static struct resource iq80331_gpio_res[] = {
	DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x1780), 0x10),
};

static void __init iq80331_init_machine(void)
{
	platform_device_register_simple("gpio-iop", 0,
					iq80331_gpio_res,
					ARRAY_SIZE(iq80331_gpio_res));
	platform_device_register(&iop3xx_i2c0_device);
	platform_device_register(&iop3xx_i2c1_device);
	platform_device_register(&iop33x_uart0_device);
	platform_device_register(&iop33x_uart1_device);
	platform_device_register(&iq80331_flash_device);
	platform_device_register(&iop3xx_dma_0_channel);
	platform_device_register(&iop3xx_dma_1_channel);
	platform_device_register(&iop3xx_aau_channel);
}

MACHINE_START(IQ80331, "Intel IQ80331")
	/* Maintainer: Intel Corp. */
	.atag_offset	= 0x100,
	.map_io		= iop3xx_map_io,
	.init_irq	= iop33x_init_irq,
	.init_time	= iq80331_timer_init,
	.init_machine	= iq80331_init_machine,
	.restart	= iop3xx_restart,
MACHINE_END
| 1.823 | 1.302 | 100.0% | 20 | +----------------------+-------+--------+--------+--------+-------+-------+---------+-------+ Load duration: 7.13633608818 Full duration: 36.7863121033 .............. +------------------------------------------------------------------------------------------+ | Response Times (sec) | +---------------------+-------+--------+--------+--------+-------+-------+---------+-------+ | action | min | median | 90%ile | 95%ile | max | avg | success | count | +---------------------+-------+--------+--------+--------+-------+-------+---------+-------+ | nova.create_keypair | 1.005 | 1.784 | 3.025 | 3.636 | 4.373 | 2.004 | 100.0% | 20 | | nova.delete_keypair | 0.199 | 0.699 | 1.007 | 1.244 | 3.014 | 0.79 | 100.0% | 20 | | total | 1.249 | 2.625 | 4.259 | 4.845 | 5.131 | 2.794 | 100.0% | 20 | +---------------------+-------+--------+--------+--------+-------+-------+---------+-------+ Load duration: 14.9231169224 Full duration: 71.4614388943 At the end of the module test, a message is displayed to provide a global summary:: 2016-02-04 12:50:18,382 - run_rally - INFO - Test scenario: "requests" OK. Controllers ----------- OpenDaylight ^^^^^^^^^^^^ The results of ODL tests can be seen in the console:: ============================================================================== Basic ============================================================================== Basic.010 Restconf OK :: Test suite to verify Restconf is OK ============================================================================== Get Controller Modules :: Get the controller modules via Restconf | PASS | ------------------------------------------------------------------------------ Basic.010 Restconf OK :: Test suite to verify Restconf is OK | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== Basic | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== Output: /home/opnfv/repos/functest/output.xml Log: /home/opnfv/repos/functest/log.html Report: /home/opnfv/repos/functest/report.html .............................................................................. Neutron.Delete Networks :: Checking Network deleted in OpenStack a... | PASS | 2 critical tests, 2 passed, 0 failed 2 tests total, 2 passed, 0 failed ============================================================================== Neutron :: Test suite for Neutron Plugin | PASS | 18 critical tests, 18 passed, 0 failed 18 tests total, 18 passed, 0 failed ============================================================================== Output: /home/opnfv/repos/functest/output.xml Log: /home/opnfv/repos/functest/log.html Report: /home/opnfv/repos/functest/report.html 3 result files are generated: * output.xml * log.html * report.html **ODL result page** .. figure:: ../images/functestODL.png :width: 170mm :align: center :alt: ODL suite result page ONOS ^^^^ The ONOS test logs can be found in OnosSystemTest/, and TestON/, and logs/ (ONOSCI_PATH to be added), and can also be seen in the console:: ****************************** Result summary for Testcase4 ****************************** 2016-01-14 05:25:40,529 - FUNCvirNetNBL3 - INFO - ONOS Router Delete test Start [2016-01-14 05:25:40.529644] [FUNCvirNetNBL3] [CASE] Virtual Network NBI Test - Router 2016-01-14 05:25:40,530 - FUNCvirNetNBL3 - INFO - Generate Post Data [2016-01-14 05:25:40.530825] [FUNCvirNetNBL3] [STEP] 4.1: Post Network Data via HTTP(Post Router need post network) 2016-01-14 05:25:40,531 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/networks/ using POST method. 2016-01-14 05:25:40,539 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal 2016-01-14 05:25:40,539 - FUNCvirNetNBL3 - INFO - Post Network Success 2016-01-14 05:25:40,539 - FUNCvirNetNBL3 - INFO - Assertion Passed [2016-01-14 05:25:40.539687] [FUNCvirNetNBL3] [STEP] 4.2: Post Router Data via HTTP 2016-01-14 05:25:40,540 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/routers/ using POST method. 2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal 2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Post Router Success 2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Assertion Passed [2016-01-14 05:25:40.543489] [FUNCvirNetNBL3] [STEP] 4.3: Delete Router Data via HTTP 2016-01-14 05:25:40,543 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/routers/e44bd655-e22c-4aeb-b1e9-ea1606875178 using DELETE method. 2016-01-14 05:25:40,546 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal 2016-01-14 05:25:40,546 - FUNCvirNetNBL3 - INFO - Delete Router Success 2016-01-14 05:25:40,546 - FUNCvirNetNBL3 - INFO - Assertion Passed [2016-01-14 05:25:40.546774] [FUNCvirNetNBL3] [STEP] 4.4: Get Router Data is NULL 2016-01-14 05:25:40,547 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/routers/e44bd655-e22c-4aeb-b1e9-ea1606875178 using GET method. 2016-01-14 05:25:40,550 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal 2016-01-14 05:25:40,550 - FUNCvirNetNBL3 - INFO - Get Router Success 2016-01-14 05:25:40,550 - FUNCvirNetNBL3 - INFO - Assertion Passed ***************************** Result: Pass ***************************** ....................................................................................... ****************************** Result summary for Testcase9 ****************************** ....................................................................................... [2016-01-14 05:26:42.543489] [FUNCvirNetNBL3] [STEP] 9.6: FloatingIp Clean Data via HTTP 2016-01-14 05:26:42,543 - FUNCvirNetNBL3 - INFO - Sending request http://192.168.122.56:8181/onos/vtn/floatingips/e44bd655-e22c-4aeb-b1e9-ea1606875178 using DELETE method. 2016-01-14 05:26:42,546 - FUNCvirNetNBL3 - INFO - Verifying the Expected is equal to the actual or not using assert_equal 2016-01-14 05:26:42,546 - FUNCvirNetNBL3 - ERROR - Delete Floatingip failed ....................................................................................... ***************************** Result: Failed ***************************** There is a result summary for each testcase, and a global summary for the whole test. If any problem occurs during the test, a ERROR message will be provided in the test and the the global summary:: ************************************* Test Execution Summary ************************************* Test Start : 14 Jan 2016 05:25:37 Test End : 14 Jan 2016 05:25:41 Execution Time : 0:00:03.349087 Total tests planned : 11 Total tests RUN : 11 Total Pass : 8 Total Fail : 3 Total No Result : 0 Success Percentage : 72% Execution Result : 100% OpenContrail ^^^^^^^^^^^^ TODO OVNO Feature ------- vIMS ^^^^ The results in the console can be described as follows:: FUNCTEST.info: Running vIMS test... 2016-02-04 13:46:25,025 - vIMS - INFO - Prepare OpenStack plateform (create tenant and user) 2016-02-04 13:46:25,312 - vIMS - INFO - Update OpenStack creds informations 2016-02-04 13:46:25,312 - vIMS - INFO - Upload some OS images if it doesn't exist 2016-02-04 13:46:25,566 - vIMS - INFO - centos_7 image doesn't exist on glance repository. Try downloading this image and upload on glance ! 2016-02-04 13:47:06,167 - vIMS - INFO - ubuntu_14.04 image doesn't exist on glance repository. Try downloading this image and upload on glance ! 2016-02-04 13:47:26,987 - vIMS - INFO - Update security group quota for this tenant 2016-02-04 13:47:27,193 - vIMS - INFO - Update cinder quota for this tenant 2016-02-04 13:47:27,746 - vIMS - INFO - Collect flavor id for cloudify manager server 2016-02-04 13:47:28,326 - vIMS - INFO - Prepare virtualenv for cloudify-cli 2016-02-04 13:48:00,657 - vIMS - INFO - Downloading the cloudify manager server blueprint 2016-02-04 13:48:03,391 - vIMS - INFO - Cloudify deployment Start Time:'2016-02-04 13:48:03' 2016-02-04 13:48:03,391 - vIMS - INFO - Writing the inputs file 2016-02-04 13:48:03,395 - vIMS - INFO - Launching the cloudify-manager deployment 2016-02-04 13:56:03,501 - vIMS - INFO - Cloudify-manager server is UP ! 2016-02-04 13:56:03,502 - vIMS - INFO - Cloudify deployment duration:'480.1' 2016-02-04 13:56:03,502 - vIMS - INFO - Collect flavor id for all clearwater vm 2016-02-04 13:56:04,093 - vIMS - INFO - vIMS VNF deployment Start Time:'2016-02-04 13:56:04' 2016-02-04 13:56:04,093 - vIMS - INFO - Downloading the openstack-blueprint.yaml blueprint 2016-02-04 13:56:06,265 - vIMS - INFO - Writing the inputs file 2016-02-04 13:56:06,268 - vIMS - INFO - Launching the clearwater deployment 2016-02-04 14:11:27,101 - vIMS - INFO - The deployment of clearwater-opnfv is ended 2016-02-04 14:11:27,103 - vIMS - INFO - vIMS VNF deployment duration:'923.0' 2016-02-04 14:14:31,976 - vIMS - INFO - vIMS functional test Start Time:'2016-02-04 14:14:31' 2016-02-04 14:15:45,880 - vIMS - INFO - vIMS functional test duration:'73.9' 2016-02-04 14:15:46,113 - vIMS - INFO - Launching the clearwater-opnfv undeployment 2016-02-04 14:18:12,604 - vIMS - INFO - Launching the cloudify-manager undeployment 2016-02-04 14:18:51,808 - vIMS - INFO - Cloudify-manager server has been successfully removed! 2016-02-04 14:18:51,870 - vIMS - INFO - Removing vIMS tenant .. 2016-02-04 14:18:52,131 - vIMS - INFO - Removing vIMS user .. Please note that vIMS traces can bee summarized in several steps: * INFO: environment prepared successfully => environment OK * INFO - Cloudify-manager server is UP ! => orchestrator deployed * INFO - The deployment of clearwater-opnfv is ended => VNF deployed * Multiple Identities (UDP) - (6505550771, 6505550675) Passed => tests run Promise ^^^^^^^ The results can be observed in the console:: Running test case: promise ---------------------------------------------- FUNCTEST.info: Running PROMISE test case... 2016-02-04 07:10:37,735 - Promise- INFO - Creating tenant 'promise'... 2016-02-04 07:10:37,893 - Promise- INFO - Adding role '59828986a9a94dfaa852548599fde628' to tenant 'promise'... 2016-02-04 07:10:38,005 - Promise- INFO - Creating user 'promiser'... 2016-02-04 07:10:38,128 - Promise- INFO - Updating OpenStack credentials... 2016-02-04 07:10:38,157 - Promise- INFO - Creating image 'promise-img' from '/home/opnfv/functest/data/cirros-0.3.4-x86_64-disk.img'... 2016-02-04 07:10:42,016 - Promise- INFO - Creating flavor 'promise-flavor'... 2016-02-04 07:10:42,836 - Promise- INFO - Exporting environment variables... 2016-02-04 07:10:42,836 - Promise- INFO - Running command: DEBUG=1 npm run -s test -- --reporter json 2016-02-04 07:10:51,505 - Promise- INFO - The test succeeded. .... ********************************** Promise test summary ********************************** Test start: Thu Feb 04 07:10:42 UTC 2016 Test end: Thu Feb 04 07:10:51 UTC 2016 Execution time: 8.7 Total tests executed: 33 Total tests failed: 0 **********************************