forked from antmicro/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from QuickLogic-Corp/code_review_changes1
Antmicro Code review changes
- Loading branch information
Showing
27 changed files
with
267 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright 2020 QuickLogic | ||
# Licensed under the Apache License, Version 2.0 | ||
|
||
config EOS_S3_LED_BASIC | ||
bool "EOS S3 basic LED driver" | ||
help | ||
Enable basic LED driver for QL S3. | ||
|
File renamed without changes.
32 changes: 16 additions & 16 deletions
32
drivers/led/led_eos_s3_1.c → drivers/led/led_eos_s3_basic.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
/* | ||
* ========================================================== | ||
* | ||
* Copyright (C) 2020 QuickLogic Corporation | ||
* Copyright (C) 2020 QuickLogic Corporation | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* File : led_eos_s3_1.c | ||
* Purpose : This is the driver for LED controller IP. | ||
* | ||
* | ||
* File : led_eos_s3_basic.c | ||
* Purpose : This is the driver for basic LED controller IP. | ||
* | ||
* | ||
* =========================================================== | ||
* | ||
*/ | ||
|
||
#include <zephyr.h> | ||
#include <soc.h> | ||
#include <fpga_loader.h> | ||
#include "eos_s3_led1_ip.h" | ||
#include "eos_s3_led_basic_ip.h" | ||
#include "eos_s3_led_config.h" | ||
|
||
static void config_ios() | ||
static void config_ios(void) | ||
{ | ||
eos_s3_io_mux(FPGA_LED0_PAD, FPGA_LED0_PAD_CFG); | ||
eos_s3_io_mux(FPGA_LED1_PAD, FPGA_LED1_PAD_CFG); | ||
eos_s3_io_mux(FPGA_LED2_PAD, FPGA_LED2_PAD_CFG); | ||
|
||
eos_s3_fbio_select(FPGA_LED0_PAD,FPGA_LED0_FBIO_SEL); | ||
eos_s3_fbio_select(FPGA_LED1_PAD,FPGA_LED1_FBIO_SEL); | ||
eos_s3_fbio_select(FPGA_LED2_PAD,FPGA_LED2_FBIO_SEL); | ||
eos_s3_fbio_select(FPGA_LED0_PAD, FPGA_LED0_FBIO_SEL); | ||
eos_s3_fbio_select(FPGA_LED1_PAD, FPGA_LED1_FBIO_SEL); | ||
eos_s3_fbio_select(FPGA_LED2_PAD, FPGA_LED2_FBIO_SEL); | ||
|
||
} | ||
|
||
void program_fpga_ip() | ||
void program_fpga_ip(void) | ||
{ | ||
// Load bitstrem into FPGA | ||
load_fpga(sizeof(axFPGABitStream),axFPGABitStream); | ||
/* Load bitstrem into FPGA */ | ||
load_fpga(sizeof(axFPGABitStream), axFPGABitStream); | ||
|
||
// Configure IOs | ||
/* Configure IOs */ | ||
config_ios(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2020 QuickLogic | ||
# Licensed under the Apache License, Version 2.0 | ||
|
||
menuconfig EOS_S3_PWM | ||
bool "EOS S3 LiteX PWM driver" | ||
depends on HAS_DTS | ||
help | ||
Set if PWM IP generated with EOS S3 tools | ||
|
||
if EOS_S3_PWM | ||
|
||
config PWM_LITEX_INIT_PRIORITY | ||
int "Init priority" | ||
default 70 | ||
help | ||
PWM device driver initialization priority. | ||
|
||
endif # PWM_LITEX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
samples/drivers/led_eos_s3_1/CMakeLists.txt → ...s/drivers/led_eos_s3_basic/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
sample: | ||
description: Demonstration of the eos_s3 basic LED driver | ||
name: led_eos_s3_basic sample | ||
tests: | ||
sample.drivers.led.eos_s3_basic: | ||
platform_whitelist: quick_feather | ||
tags: led | ||
harness: TBD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* ========================================================== | ||
* | ||
* Copyright (C) 2020 QuickLogic Corporation | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* File : main.c | ||
* Purpose : This file has simple prints. | ||
* No other configuration needs to be done here | ||
* | ||
* =========================================================== | ||
*/ | ||
|
||
#include <zephyr.h> | ||
#include <device.h> | ||
#include <soc.h> | ||
|
||
void main(void) | ||
{ | ||
printk("\n\n"); | ||
printk("##########################\n"); | ||
printk("Quicklogic Open Platform 2.0\n"); | ||
printk("SW Version: "); | ||
printk(" OP2-QuickFeather-led-eos-s3-basic sample"); | ||
printk("\n"); | ||
printk(__DATE__ " " __TIME__ "\n"); | ||
printk("##########################\n\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.